I hereby claim:
- I am djk29a on github.
- I am djk29a (https://keybase.io/djk29a) on keybase.
- I have a public key ASCQLM9VXCy9BpHeqxj2zEb_VtmPOBbFS3lMYT-D1wgQdwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# get all files modified in a branch | |
git diff --name-only <notMainDev> $(git merge-base <notMainDev> <mainDev>) | |
# shorter alternative for git versions... ?+ | |
git whatchanged --name-only --pretty="" origin..HEAD |
wget http://stedolan.github.io/jq/download/linux64/jq || sudo apt-get -y --force-yes install jq || sudo yum install -y jq | |
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \ | |
"Name=instance-state-name,Values=running" \ | |
| jq -r \ | |
".Reservations[] | .Instances[] | .InstanceId" \ | |
aws ec2 describe-volumes --filters \ | |
"Name=status,Values=available" \ | |
| jq -r ".Volumes[] | .VolumeId" \ |
require 'find' | |
root = '/Volumes/music' # pick your path | |
Find.find(root) do |path| | |
if FileTest.directory? path and File.basename(path)[0] == '.' | |
Find.prune | |
else | |
d, f = File.split path | |
if f =~ /^(\d+(\-\d+)?.+)(\s\d+)\.(mp3)$/i | |
orig_file = File.join(d, $1 + '.' + $4) # check for existence of original file name including extension case | |
if File.readable? orig_file |
for u in username1 username2; do | |
# Ok, the groups are probably off but you get the point | |
useradd -p $(openssl passwd -1 ABC123def) -G primarygroup -g additionalgroups ${u} | |
end |
for node in $(knife search node "ohai_time:[* TO $(date +%s -d '5hours ago')]" -i); do | |
knife client delete -y $node | |
knife node delete -y $node | |
done |
from HTMLParser import HTMLParser | |
import sys | |
""" | |
ZScaler IP Page Parser | |
$ curl -sL http://ip.zscaler.com/cgi-bin/index.cgi | python zscaler-status.py | |
{"proxycloud": "zscalertwo.net", | |
"proxyhost":"zs2-*redacted*", | |
"ip": "*redacted_ip*"} |
sudo mtr --port 443 --show-ips -T $1 -4 --no-dns --mpls # not sure why I needed both --show-ips and --no-dns, hmm |
# Retrieve the size of Chef cookbooks used by different organizations on the Chef server it runs on | |
# Should run as root normally since we use su to hop across to another user | |
full_org_list='' | |
full_file_list='' | |
orgs={} | |
# Getting orgs can take a while, let's hold onto the results for repeat invocations | |
if not File.exist?('.orgs-cached') | |
# NOTE: this produces 2 header lines and a footer line that has the rowcount |
mkdir environments | |
for env in $(knife environment list); do | |
knife environment show "${env}" --format=json > "environments/${env}.json" | |
done |