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
#!/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
#!/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
#!/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 | |
# | |
# 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 | |
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
module Debug | |
def whoAmI? | |
"#{self.name} (\##{self.id}): #{self.to_s}" | |
end | |
end | |
module Debugger | |
def whoAmI? | |
"#{self.id}: #{self.to_s}" | |
end |
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
module UtilitiesCost | |
( electricityCost | |
, gasCost | |
, waterCost | |
, utilitiesCost | |
) where | |
import Debug.Trace | |
data Reading = Reading Double Double deriving (Eq, Show, Read) |
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
dpkg --purge `dpkg --get-selections | grep deinstall | cut -f1` |
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 | |
XCODEUUID=`defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID` | |
defaults write ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/$1.xcplugin/Contents/Info DVTPlugInCompatibilityUUIDs -array-add $XCODEUUID |