This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
TF_STATE_BUCKET=tfstate-ops | |
TF_STATE_PREFIX=cluster/ops | |
### USE REMOTE TFSTATE via S3 | |
terraform init \ | |
-backend-config=bucket=${TF_STATE_BUCKET} \ | |
-backend-config=key=${TF_STATE_PREFIX}/cluster.tfstate \ | |
-backend-config=region=us-west-2 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file: ~/.gitconfig | |
# my name is the same in real life and at work. | |
[user] | |
name = "Sean O'Donnell" | |
# All repos/subdirectories in ~/projects/work/ shall respect my work email address/config. | |
[includeIf "gitdir:~/projects/work/"] | |
path = ~/projects/work/.gitconfig | |
# All repos/subdirectories in ~/projects/personal/ shall respect my personal email address/config. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# This script is intended to interactively help you remove stale/unwanted github forks | |
# from your repo list, without accidently removing any of your actual (non-forked) repos. | |
# | |
# The use case for this is simple: I forked wayyyy too many repos that I should | |
# have otherwise 'starred', and wanted to clean-up my repository list. | |
# | |
# Manually purging all of my forked github repos via the github.com webui would take | |
# far too much effort, so I decided to automate the majority of the process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# This script is intended to interactively help you remove stale/unwanted github forks | |
# from your repo list, without accidently removing any of your actual (non-forked) repos. | |
# | |
# The use case for this is simple: I forked wayyyy too many repos that I should | |
# have otherwise 'starred', and wanted to clean-up my repository list. | |
# | |
# Manually purging all of my forked github repos via the github.com webui would take | |
# far too much effort, so I decided to automate the majority of the process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
########################### | |
# define your fully qualified domain name. | |
FQDN=mydomainname.com | |
########################### | |
# wildcard cert config | |
# Assuming you're using various vhosts/sub-domains, | |
# you'll most likely want to choose a wildcard certificate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function helper() { echo -e "\nOptions:\n\n\t-a <app>\n\t-v <version>\n"; exit; } | |
while getopts "a:v:h" opt; do | |
case $opt in | |
c) APP=$OPTARG; echo "APP: ${APP}";; | |
v) VER=$OPTARG; echo "VER: ${VER}";; | |
h|*) helper;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# | |
# This gist shows how to process (4) common argument styles in python3 using the getopt module. | |
# | |
# -a | |
# -a val | |
# --a=val | |
# --a | |
# | |
import sys, getopt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import tarfile | |
tar = tarfile.open("release.tar.gz", "w:gz") | |
for name in ["LICENSE", "README.md", "bin","src","examples"]: | |
tar.add(name) | |
print(tar.list("release.tar.gz")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: python | |
python: 3.6 | |
script: | |
- python3 feed.py -u https://phys.org/rss-feed/ | |
- python3 feed.py -u https://hackaday.com/blog/feed/ | |
- python3 feed.py -u https://www.wired.com/feed/rss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This gist is just a bunch of notes on quickly | |
# setting-up VSCode and all my favorite Extensions | |
# on a new MacOS machine, after a fresh install. | |
# | |
# This is handy if you're using VSCode on various | |
# MacOS machines, like at work and your iMac or Macbook @ home. | |
# | |
# This is mainly for my own personal reference, since I'll | |
# surely forget this after doing this once. |
NewerOlder