Skip to content

Instantly share code, notes, and snippets.

tr3buchet tr3buchet

Block or report user

Report or block tr3buchet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
evanscottgray /
Last active Nov 8, 2017
Getting UDP out from behind a restrictive firewall.

Mosh + OpenVPN = Love

Okay. Let's pretend here for a sec that you work in an office where UDP is filtered outbound, but we really want to use UDP for mosh.

Here's the plan at a high level.

  1. Spin up a cloud server
  2. Install Docker
  3. Start OpenVPN Container
  4. Grab .ovpn config
  5. Modify .ovpn config to a include static route to your UDP-enabled destination
tr3buchet / gist:925258b280fd66dae994
Created Aug 20, 2014 github verification
View gist:925258b280fd66dae994
### Keybase proof
I hereby claim:
* I am tr3buchet on github.
* I am tr3buchet ( on keybase.
* I have a public key whose fingerprint is 9B3A 9015 9077 E86D 02FE 9A67 E4CB 73E4 E1A7 330E
To claim this, I am signing this object:
rconradharris / git ls
Created Oct 18, 2013
Useful alias for seeing recent branches
View git ls
ls = ! git for-each-ref --sort='-committerdate' --format='%(refname:short)' refs/heads | xargs -n1 -I{} git log -n1 --pretty=format:'%Cblue%cr%Creset%x09{}' {}
FredLoney /
Last active Jan 5, 2019
Prints the current stack to a logger.
import inspect
import logging
HEADER_FMT = "Call stack at %s, line %d in function %s, frames %d to %d of %d:"
"""The log header message formatter."""
STACK_FMT = "%s, line %d in function %s."
"""The log stack message formatter."""
def log_stack(logger=None, limit=None, start=0):
tr3buchet / gist:4481060
Last active Dec 30, 2016
python keyring cli for gister
View gist:4481060
### note
I installed keyring with pip install --user, so my keyring binary is at ~/.local/bin/keyring
# add public github token to keyring
[trey|d3v ~]% keyring set gister public_oauth
Password for 'public_oauth' in 'gister': <paste github oauth token here>
[trey|d3v ~]% keyring get gister public_oauth
# add private github token to keyring

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
andyhky /
Created Mar 31, 2011
MySQL Backup Script
#backup all mysql databases
# list MySQL databases and dump each
DATESTAMP=$(date +%Y%m%d)
# remove old backups
find ${DIR} -type f -mtime +5 -exec rm -rf {} \;
You can’t perform that action at this time.