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
[Unit] | |
Description=AutoSSH socks5 tunnel | |
After=network-online.target ssh.service | |
[Service] | |
Environment="AUTOSSH_GATETIME=0" | |
ExecStart=/usr/bin/autossh -M 0 -N -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /root/.ssh/id_rsa -D 0.0.0.0:1080 root@127.0.0.1 | |
ExecStop=/bin/kill $MAINPID | |
[Install] |
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
# First, disable SIP | |
# Boot into recovery with CMD+R | |
csrutil disable | |
# Reboot... | |
# Get board ID | |
BOARD_ID=`ioreg -l | grep board-id | sed 's/.*<"\(.*\)">.*/\1/'` | |
# Modify IOPlatformPlygin ktext |
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
docker images $REPO | awk '{if ($2 == "latest") print $3;}' | xargs sh -c 'docker images | grep $0' | awk '{if ($2 != "latest") print $2;}' |
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 bash | |
boot2docker down | |
vboxmanage modifyvm "boot2docker-vm" --natpf1 "docker,tcp,127.0.0.1,2376,,2376" | |
boot2docker up | |
$(boot2docker shellinit) | |
export DOCKER_HOST=tcp://127.0.0.1:2376 |
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
// Override the default Backbone.collection.fetch() | |
// to avoid being called before the last one has finished | |
Backbone.Collection.prototype.fetch = _.wrap( | |
Backbone.Collection.prototype.fetch, | |
function(original_fetch) { | |
var args = Array.prototype.slice.call(arguments, 1); | |
// Check if the last fetch() is still underway, if so skip this one. | |
if (this.fetch_pending === true) return; | |
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 bash | |
function usage () { | |
cat <<EOF | |
Usage: $0 [-p] -e|-d -f <file> | |
where: | |
-e enable cron jobs | |
-d disable cron jobs | |
-p print only | |
-f modify existing file |