Skip to content

Instantly share code, notes, and snippets.

@nerdlich
nerdlich / cloudSettings
Last active December 7, 2018 15:02
my vscode settings
{"lastUpload":"2018-12-07T15:02:02.048Z","extensionVersion":"v3.1.2"}
@nerdlich
nerdlich / prepare-chroot
Last active March 25, 2016 13:13
Script that prepares a ssh chroot
#!/bin/bash
if (( $# < 2 )); then
echo "Usage: $0 chroot_dir program [program ...]"
exit 1
else
CHROOT="$1"; shift
fi
function same_file() {
@nerdlich
nerdlich / crashplan-remote
Last active September 7, 2016 18:39
Script to connect to a headless Linux Crashplan server from OS X
#!/bin/bash
if [ "$1" == '' ]; then echo "Please provide a hostname to connect."; exit 1; fi
if [ $(whoami) != 'root' ]; then echo "Need to run with sudo"; exit 1; fi
host=$1
# get secrets
remote_secret=$(ssh root@$host "cat /var/lib/crashplan/.ui_info | cut -d',' -f2")
local_secret=$(cat /Library/Application\ Support/CrashPlan/.ui_info | cut -d',' -f2)