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
### Keybase proof | |
I hereby claim: | |
* I am popmonkey on github. | |
* I am popmonkey (https://keybase.io/popmonkey) on keybase. | |
* I have a public key whose fingerprint is 93DD 72A0 A9F8 D017 8641 3F06 9A3A DE35 F7DA 1018 | |
To claim this, I am signing this object: |
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
#!/bin/bash | |
# | |
# will create new directories each time it is executed with hard links to unchanged files | |
# exclude file can be used to skip certain files/directories as specified by rsync | |
# see the FILTER section of https://linux.die.net/man/1/rsync | |
SRC=$1 | |
DST=$2 | |
if [ ! \( -d "$DST" -a -d "$SRC" \) ]; then |
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
#!/bin/bash | |
### WARNING!!!!! WARNING!!!!! WARNING!!!!! | |
# | |
# this script should *not* be used as is without understanding everything it does (and possibly modifying): | |
# 1. it assumes you want to backup all your dbs on the source machine | |
# 2. the restore instructions are also for restoring all dbs in the tar file | |
# 3. there are hardcoded paths to various utilities | |
# | |
# i'm not responsible for your lost data |
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
# allow the scrollback to scroll through SCREEN buffer | |
termcapinfo xterm* ti@:te@ | |
# fix the damn delete key (mac Terminal.app users) | |
termcapinfo xterm-color kD=\E[3~ | |
# visual bell, c'mon! | |
vbell off | |
# go directly to work | |
startup_message off |
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
# keys | |
for key in # list or glob of identities | |
do | |
KEY_SIG=$(cat ~/.ssh/$key.pub) | |
if [ `ssh-add -L | grep "$KEY_SIG" | wc -l` -ne 1 ] ; then ssh-add ~/.ssh/$key ; fi | |
done |
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 a log file parser that looks for sql UPDATE statements and filters for specified tables and ids. | |
It can read from multiple sources and write to a separate file for each table and id combination. | |
examples: | |
`./looklog.py -t user,order *.log`: prints UPDATE statements for the ORDER and USER tables in *.log to stdout | |
`tail -F current.log | ./looklog.py -t user -i 12345`: real time tails current.log and filters for updates to |
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
#!/bin/sh | |
# | |
# USG and EdgeRouter route-test script for failover | |
# | |
# uses ping to check latency and packet loss. | |
# returns zero when within thresholds and non zero (1) when above thresholds | |
# uses ping, traceroute, and logger | |
# | |
# by https://github.com/popmonkey | |
# |
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
#!/bin/sh | |
# Turns off low priorioty throttling while Time Machine backups are in progress. | |
# Also prevents sleeping/idling while TM is running | |
# | |
# by https://github.com/popmonkey | |
# | |
# to truly automate this, add the following to /etc/sudoers (sudo visudo) | |
# (remove one set of # and change 'user' to your username) |