Skip to content

Instantly share code, notes, and snippets.

View rot26's full-sized avatar
💬
is typing...

Chris Coleman rot26

💬
is typing...
  • Denver, Colorado, United States
  • 04:11 (UTC -06:00)
View GitHub Profile
@rot26
rot26 / .bashrc
Last active November 26, 2022 02:56
[.bashrc.d] Use bashrc directory instead of bashrc #bash #bashrc
# Add this to your ~/.bashrc file
# Use .bashrc.d directory instead of bloated .bashrc file
# From: https://waxzce.medium.com/use-bashrc-d-directory-instead-of-bloated-bashrc-50204d5389ff
BASHRC_DIR="${HOME}/.bashrc.d"
# Optionally create directory if not exists
if [ ! -d "${BASHRC_DIR}" ]; then
mkdir -p "${BASHRC_DIR}";
chmod 700 "${BASHRC_DIR}";
fi
# Load any *.bashrc files in ~/.bashrc.d/
@rot26
rot26 / change-ssh-keyfile-password.md
Last active February 24, 2021 16:52
[change ssh keyfile password] #ssh #security #password #SecurityTheater
@rot26
rot26 / environment.py
Created May 29, 2020 21:58
[Behave Hooks ] #gherkin #behave #bdd #template #python
def before_all(context):
print('before_all activated')
def after_all(context):
print('after_all activated')
def before_feature(context, feature):
print('before_feature activated')
@rot26
rot26 / docker-example.sh
Last active May 21, 2020 21:45
[AWS Get Session Token Vars] Get the vars from an aws session token. #aws #cicd
docker run \
-e "AWS_SESSION_TOKEN=${session_token}" \
-e "AWS_ACCESS_KEY_ID=${access_key_id}" \
-e "AWS_SECRET_ACCESS_KEY=${secret_access_key}" \
-e "AWS_DEFAULT_REGION=us-east-1" \
-v $PWD:/usr/src/app -w /usr/src/app \
node:12 npm run cdk -- -v synth
@rot26
rot26 / notes.sh
Last active May 14, 2020 03:52
mutli-region refactor
# Checkout
git pull
git ck -b region-forwarder
# Setup Directories
mkdir -p terraform/cwe
mkdir -p terraform/sqs_lambda
@rot26
rot26 / keybase.md
Created May 5, 2020 04:59
keybase.md

Keybase proof

I hereby claim:

  • I am rot26 on github.
  • I am rot26 (https://keybase.io/rot26) on keybase.
  • I have a public key ASAacqKPnGSuKGtzwIoJvm3nxtMBpqOJe8J8VON644J0oQo

To claim this, I am signing this object:

@rot26
rot26 / git-default-branch
Created February 17, 2020 23:46
[git-default-branch] Determine the default branch ref of the remote #git
git symbolic-ref refs/remotes/origin/HEAD
@rot26
rot26 / xargs-git-status.sh
Created February 17, 2020 22:54
[xargs-git-status] using a list of directories, cd and perform operation #shell #fav #git #xargs
cat directories.txt | xargs -L 1 sh -c 'cd "$0" && pwd && git status'
@rot26
rot26 / Makefile
Last active October 22, 2019 03:32
[Makefile help] self-documenting makefile #make #documenting
## help: display this help message
# Any line prefixed with two hashes will be output on `make help`
# The colon `:` is the alignment seperator
.PHONY : help
help : Makefile
@sed -n 's/^##//p' $< | column -t -s: