I hereby claim:
- I am nickrw on github.
- I am nickrw (https://keybase.io/nickrw) on keybase.
- I have a public key whose fingerprint is B4D5 7034 97E0 96A6 EEA8 4CDE DE30 8C8E E20F B087
To claim this, I am signing this object:
#!/bin/sh | |
# Usage: ./find-access-key-by-id.sh <ACCESS KEY ID> | |
# Dependencies: | |
# * awscli (pip install awscli) | |
# * jq (https://github.com/stedolan/jq) | |
MYSTERY_KEY=$1 | |
users=$(aws iam list-users | jq -r .Users[].UserName) |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
## My spotify related i3 bindings which use this script | |
# bindsym XF86AudioPlay exec --no-startup-id ~/bin/spotify-remote.sh playpause | |
# bindsym XF86AudioStop exec --no-startup-id ~/bin/spotify-remote.sh pause | |
# bindsym XF86AudioPrev exec --no-startup-id ~/bin/spotify-remote.sh previous | |
# bindsym XF86AudioNext exec --no-startup-id ~/bin/spotify-remote.sh next | |
## and other related spotify workspace stuff | |
# for_window [class="^Spotify"] move to workspace Music |
#!/usr/bin/env python | |
from boto import ec2 | |
from functools import wraps | |
import re | |
def ip4(wrapped_func): | |
def _dec(request, *args, **kwargs): | |
response = wrapped_func(request, *args, **kwargs) | |
return [i.private_ip_address for i in response] |
#!/bin/bash | |
ssh="ssh -o StrictHostKeyChecking=no" | |
function split_tmux() { | |
session=$1 | |
shift | |
count=$(echo $@ | tr ' ' '\n' | wc -l) | |
echo "Starting session to $count hosts in $session: [$@]" | |
session="$session ($count)" |
#!/bin/bash | |
try_ec2="$(resolve-ec2 $@)" | |
if [[ -z $try_ec2 ]]; then | |
ssh $@ | |
else | |
if [[ $(echo "$try_ec2" | wc -l ) -gt 1 ]]; then | |
mux $1 $try_ec2 | |
else | |
ssh $try_ec2 |
#!/bin/sh | |
# Fetches the next item in your google calendar (assuming pre-set-up by running gcalcli) | |
CALENDAR_NAME="" | |
cal="$(gcalcli \ | |
--nostarted \ | |
--calendar $CALENDAR_NAME \ | |
--nocolor \ |
SELECT t.relname, l.locktype, page, virtualtransaction, pid, mode, granted | |
FROM pg_locks l, pg_stat_all_tables t | |
WHERE l.relation=t.relid | |
ORDER BY relation ASC; |
#!/usr/bin/env python | |
# Logs all IP addresses for every ELB in an AWS account | |
import boto3 | |
import dns.resolver | |
from dns.exception import DNSException | |
import logging | |
logger = logging.getLogger('elbdns') |
#!/bin/bash | |
# depends: scrot imagemagick keychain rivalctl | |
# Take a screenshot | |
scrot /tmp/lockshot.png | |
# Apply pixellation effect | |
convert /tmp/lockshot.png -scale 5% -scale 2000% /tmp/lockshot-pixel.png |