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 | |
SET_USER="node" | |
SET_NODE_VERSION="v0.6.14" | |
SET_HUB_PORT="1024" | |
SET_HUB_SECRET="beepboop" | |
[ -d /etc/node ] || mkdir /etc/node | |
cat > /etc/node/fleet-hub.conf <<EOT |
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 | |
# | |
# fleet-drone | |
# | |
# chkconfig: - 85 15 | |
# description: | |
# processname: fleet-drone | |
# config: /etc/node/fleet-drone.conf | |
# pidfile: /var/run/fleet-drone.pid |
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 | |
CWD=$(cd $(dirname $0); pwd) | |
HOME_DIR=$HOME | |
BASE_DIR="${HOME_DIR}/dev" | |
echo "Creating dev directory ${BASE_DIR}" | |
mkdir "${BASE_DIR}" | |
echo "Creating dev directory ${BASE_DIR}" |
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 | |
launchctl list|grep UIKitApplication|awk '{print $3}'|xargs launchctl remove |
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/local/bin/python | |
from sys import argv | |
import os | |
import math | |
import urllib2 | |
def deg2num(lat_deg, lon_deg, zoom): | |
lat_rad = math.radians(lat_deg) | |
n = 2.0 ** zoom |
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/local/bin/python | |
from sys import argv | |
import ijson | |
script, filepath = argv | |
f = open(filepath, 'r') | |
parser = ijson.parse(f) | |
for prefix, event, value in parser: | |
print "%r: %r - %r" % (event, prefix, value) |
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 | |
dir = "$1" | |
keyword = "$2" | |
find "$dir" -name '$keyword' -exec rm -i {} \; |
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 | |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user |
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
# SSH Connection pooling for faster additional connections to a machine | |
ControlMaster auto | |
ControlPath /tmp/ssh_mux_%h_%p_%r | |
# This makes subsequent connections go faster | |
ControlPersist 2h | |
# Make it so ssh-ing from one server to another passes keys around automagically | |
Host * | |
ForwardAgent yes |
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
// | |
// BaseViewController.m | |
// | |
// Created by Peter Boctor on 5/4/11. | |
// | |
// Copyright (c) 2011 Peter Boctor | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights |