Git Hook for Security Scanning Terraform

Prior to pushing local code to a Git repo, that may be publicly available (or even not), it's helpful to include a shell script in this file: .git/hooks/pre-push-check.sh #!/usr/bin/env bash # === Terraform Pre-Push Security Check === echo "🔍 Running pre-push security scan..." # Define suspicious patterns PATTERNS="AWS_SECRET|AWS_ACCESS|PRIVATE_KEY|BEGIN RSA|password|secret|token" # Scan all Terraform-related files FILES=$(git [...]

AWS CLI: Creating an IAM Group, attaching a Policy and Adding a New User

The code provided is meant to illustrate various AWS CLI IAM commands that will: Create an IAM Group Attach an AWS Policy to allow the Group Administrator Access Create an IAM User Create a login profile for that user requiring password reset upon login Add the newly created IAM User to the newly created Group [...]

AWS CLI: Config, Credentials and Profiles

AWS CLI: Config, Credentials and Profiles

The AWS config file contains non-secret information. The AWS credentials file may contain access keys in one or more profiles. Use a profile to access different key pairs that may point to different accounts. An easy way to locate the config file is through: aws configure list Note the output: Your credentials file may contain [...]

Basic VIM Cheat Sheet

Basic VIM commands to get you started Adding Text (You can get a bit more detail regarding the difference between these two here.) Saving For every command show, begin with Esc + : Navigating Editing ActionCommandDelete the current lineddDelete n linesTo delete 3 lines total (the line you're on, plus two below), type d, then [...]

Visual Studio Code Remote Development Setup

Instructions for setting up VS Code to remote to a Linux server. In my case, it's Amazon Linux 2 running .net core. In Linux, at the command line, I created a project using: dotnet new web --name Employee Then on VS Code (running in Azure), connect to the Amazon Linux instance by: Install the Extension [...]

Spinning Up .NET Core on CentOS 8

Simple steps to get going. Create the Amazon Linux Instance via the Console, CloudFormation or the CLI.Log in to the instance using SSH or EC2 Instance Connect (browser).Run the following: sudo dnf upgrade -y sudo dnf install git -y sudo rpm -Uvh https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm sudo yum install dotnet-sdk-3.1 -y # optionally test the installation cd ~ [...]

Spinning Up .NET Core on Amazon Linux

Simple steps to get going. Create the Amazon Linux Instance via the Console, CloudFormation or the CLI.Log in to the instance using SSH or EC2 Instance Connect (browser).Run the following: sudo yum upgrade -y sudo yum install git -y sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm sudo yum install dotnet-sdk-3.1 -y # optionally test the installation cd ~ [...]

A Note on Connecting GitHub Webhooks with Jenkins in AWS

Jenkins is a potential CI/CD solution for my company. I'll admit that I have it in for Azure DevOps. No one really understands it well. The person who set it up has left the company. Jenkins is likely the leader in this space. As part of this effort, I wanted to explore GitHub Webhooks as [...]

Keybinding Gnome Screenshot

There's a nice little program for taking screenshots available for Windows and Mac called Greenshot. It's keybound on my Windows installation with Ctrl+Alt+P. Greenshot isn't available on Linux. Wanting to have a consistent experience between machines with Linux' gnome-screenshot, it was fairly easy to bind that program the same way in Linux. Launch Settings. You [...]