Skip to content

Instantly share code, notes, and snippets.

@muddman
muddman / gtb
Created April 20, 2016 20:54 — forked from dschuetz/gtb
Hackish script to compute Google Authenticator tokencodes and launch a Tunnelblick VPN with the appropriate computed password+tokencode
#!/usr/bin/python
import hmac, struct, time, base64, hashlib # for totp generation
import re, sys, subprocess # for general stuff
from getopt import getopt, GetoptError # pretending to be easy-to-use
#
# gtb - Google(auth) + Tunnelblick
#
@muddman
muddman / do_crashplan_upgrade.sh
Created December 8, 2015 15:59 — forked from ex-nerd/do_crashplan_upgrade.sh
Synology Crashplan upgrade
# Fix a failed Crashplan upgrade on a Synology NAS.
# This function should be run directly on the NAS, as root.
#
# Based on Chris Nelson's blog post from here:
# http://chrisnelson.ca/2015/07/02/fixing-crashplan-4-3-0-on-synology/
function do_crashplan_upgrade() {
cp_target_dir="/var/packages/CrashPlan/target"
cp_upgrade_jar=`ls -t -1 "$cp_target_dir/upgrade/"*jar | head -n1`
cp_version=`basename "$cp_upgrade_jar" .jar`