Skip to content

Instantly share code, notes, and snippets.

Daniel Gillespie dantheman213

  • @PlutoTV
  • Los Angeles, California, USA
Block or report user

Report or block dantheman213

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dantheman213
dantheman213 / ssm_find_param_list.txt
Last active Aug 22, 2019
Find list of SSM params with a keyword or phrase
View ssm_find_param_list.txt
aws ssm describe-parameters --region us-east-1 | jq '{NextToken,Parameters:[ .Parameters | map(.Name) [] | select(index("example-keyword-here}")) ] }'
KEYWORD=trending; aws ssm describe-parameters --profile preprod | grep '"Name":' | grep -i $KEYWORD | awk '{print $2}'
@dantheman213
dantheman213 / aws-ssm-find-param
Last active Aug 19, 2019
Quickly find AWS SSM params by partial search, use custom AWS profiles, get an interactive result to query, and get a AWS URL to view and edit target
View aws-ssm-find-param
#!/usr/bin/env node
//
// Quickly find AWS SSM params by partial search, use custom AWS profiles, get an interactive
// result to query, and get a AWS URL to view and edit target.
//
// Requires AWS CLI, NodeJS v10+ and Python 2/3
//
// Before running for first time do:
// npm install inquirer
@dantheman213
dantheman213 / reset.sh
Last active May 22, 2019
Reset home permissions
View reset.sh
chmod -v 700 ~/
chmod -v 700 ~/.ssh
chmod -Rv 600 ~/.ssh/*
chmod -v 644 ~/.ssh/authorized_keys
chmod -v 644 ~/.ssh/*.pub
View uninstall_docker.md

To completely uninstall Docker:

Step 1

dpkg -l | grep -i docker To identify what installed package you have:

Step 2

sudo apt-get purge -y docker-engine docker docker.io docker-ce

@dantheman213
dantheman213 / generate-ssh-key.sh
Created Apr 18, 2019 — forked from grenade/generate-ssh-key.sh
Correct file permissions for ssh keys and config.
View generate-ssh-key.sh
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@dantheman213
dantheman213 / Dockerfile
Last active Sep 28, 2018
Go Dockerfile Example
View Dockerfile
# Dockerfile for basic Go application example
#
# Assumptions
# - There is a project dir
# - Inside the project dir, there is the path src/main
# - The project's *.go files are located in src/main
# - The project's name is "myapp"
FROM golang:1.11.0-stretch AS packager
View docker_cheat_sheet_readme.MD

Docker Cheat Sheet

Copy file from container to host

docker cp <containerId>:/file/path/within/container /host/path/target

Stop all running containers

docker stop $(docker ps -aq)
@dantheman213
dantheman213 / main.sh
Created Jul 17, 2018
Read every line of an environment variable file for Docker in as a standard bash script.
View main.sh
while read fileLine; do echo "Exporting ${fileLine}...\n"; export ${fileLine}; done < secrets.env
// EX: secrets.env
// MY_VAR=123
// MY_API_KEY=ASDFKJDSFJL234545
@dantheman213
dantheman213 / README.md
Last active May 12, 2018
Youtube Download Cheatsheet
View README.md

Youtube Download Cheatsheet

Download and install binary here: https://github.com/rg3/youtube-dl

Get Best Video and Audio

youtube-dl.exe -f "best[ext=mp4]" --no-check-certificate <VIDEO URL>

Get worst video no audio

youtube-dl.exe -f "worstvideo[ext=mp4]" --no-check-certificate <VIDEO URL>

@dantheman213
dantheman213 / install_great_gnu_screen_config.sh
Last active May 12, 2018
Download a great Gnu Screen config straight to your current user's environment
View install_great_gnu_screen_config.sh
#
# Download a great Gnu Screen config straight to your current user's environment
#
# Just paste that in wherever env you're at and run `screen` and you'll have a good configuration with a status bar,
# tabs, no warning screen, beeps/bells/alerts, and more.
#
# Screen Config (.screenrc) located here:
# Gist: https://gist.github.com/dantheman213/8df6fabb1bc6fc192c9e
# Raw: https://gist.githubusercontent.com/dantheman213/8df6fabb1bc6fc192c9e/raw/bfd65a3695974b94223849c516b5b58828932613/Great%2520GNU%2520Screen%2520config
You can’t perform that action at this time.