Skip to content

Instantly share code, notes, and snippets.

update_system()
{
sudo yum check-update -y && sudo yum update -y
}
install_dependencies(){
if grep "(Amazon Linux*)\w+" /etc/os-release; then
sudo amazon-linux-extras install epel -y
else
yum install -y epel-release
ssh-add &>/dev/null || eval `ssh-agent` &>/dev/null # start ssh-agent if not present
[ $? -eq 0 ] && { # ssh-agent has started
ssh-add ~/.ssh/id_rsa &>/dev/null # Default identity
ssh-add ~/.ssh/<user-key> &>/dev/null # user-key
}
### Keybase proof
I hereby claim:
* I am rh917 on github.
* I am rhambacher (https://keybase.io/rhambacher) on keybase.
* I have a public key whose fingerprint is 9A8F A5AC 2DB1 81B6 9FEF CC2A 4418 4F89 A0B1 9140
To claim this, I am signing this object:
@rh917
rh917 / ResizeRootLV.md
Created December 17, 2018 20:14
ResizeRootLV


How do I resize the root LV after installation on Red Hat Enterprise Linux?

SOLUTION VERIFIED - Updated March 13 2018 at 7:49 AM -

English

Environment

@rh917
rh917 / crash.log
Created October 19, 2018 21:21
terraform-crash
2018/10/19 21:13:57 [INFO] Terraform version: 0.11.9 4e44b41c8bc1b533d14f9939690adf09e3d2a2be
2018/10/19 21:13:57 [INFO] Go runtime version: go1.11.1
2018/10/19 21:13:57 [INFO] CLI args: []string{"/usr/bin/terraform", "apply", "-auto-approve"}
2018/10/19 21:13:57 [DEBUG] Attempting to open CLI config file: /home/<user>/.terraformrc
2018/10/19 21:13:57 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/10/19 21:13:57 [INFO] CLI command args: []string{"apply", "-auto-approve"}
2018/10/19 21:13:57 [INFO] command: empty terraform config, returning nil
2018/10/19 21:13:57 [DEBUG] command: no data state file found for backend config
2018/10/19 21:13:57 [DEBUG] New state was assigned lineage "b1202900-1847-dbfa-2c87-4b7c798fa367"
2018/10/19 21:13:57 [INFO] command: backend initialized: <nil>
@rh917
rh917 / gist:b8278f5ef76195bbe1cfa4ce13174b1b
Last active May 1, 2018 03:10
ADS-B Project Parts List
// Hardware
Raspberry Pi 3 Kit http://a.co/422xQct
SDR Kit http://a.co/1G69C9q
Micro SDXC card http://a.co/fHv0N51
// Hardware Optional:
Type N to SMA Male Antenna Cable http://a.co/hfQ9SC5
1090Mhz ADS-B Antenna http://a.co/eoGH7Q1
SMA male to SMA male cable (if filter used) http://a.co/dPecYdq
@rh917
rh917 / EC2-Stopped-Tagged-Lambda.py
Created March 28, 2018 03:15 — forked from mlapida/EC2-Stopped-Tagged-Lambda.py
Using a lambda function, stop all instances that are tagged appropriately.
import boto3
import logging
#setup simple logging for INFO
logger = logging.getLogger()
logger.setLevel(logging.INFO)
#define the connection
ec2 = boto3.resource('ec2')