Skip to content

Instantly share code, notes, and snippets.

View tsnow's full-sized avatar

Tim Snowhite tsnow

  • Palantir
  • Washington, DC
View GitHub Profile
/*
HTTP Host: static.ak.fbcdn.net
Generated: April 26th 2010 3:53:31 PM PDT
Machine: 10.16.139.107
Locale: nu_ll
Path: js/19khsprwvtvokwow.pkg.js
*/
if (window.CavalryLogger) {
CavalryLogger.start_js(["js\/19khsprwvtvokwow.pkg.js"]);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" id="facebook" class=" no_js">
<head>
<meta http-equiv="Content-type" content="text/html;
charset=utf-8" />
<meta http-equiv="Content-language" content="en" />
<script type="text/javascript">
//<![CDATA[
CavalryLogger=false;
-module(chat_client).
-compile(export_all).
register_nickname(Nickname) ->
Pid = spawn(chat_client, handle_messages, [Nickname]),
message_router:register_nick(Nickname, Pid).
unregister_nickname(Nickname) ->
message_router:unregister_nick(Nickname).
@tsnow
tsnow / sections.js
Created December 20, 2012 20:32 — forked from anonymous/sections.js
//js
function haversine(lat1,lon1,lat2,lon2){
var R = 6371; // km
var dLat = (lat2-lat1) / (360 / (2 * 3.1415926));
var dLon = (lon2-lon1) / (360 / (2 * 3.1415926));
var lat1 = (lat1 / (360 / (2 * 3.1415926)));
var lat2 = (lat2 / (360 / (2 * 3.1415926)));
var a = Math.sin(dLat/2) * Math.sin(dLat/2) +
@tsnow
tsnow / buildpims.sh
Last active December 11, 2015 02:29 — forked from anonymous/pkg_list
build_pims.sh and mount_nfs.sh are both on my ~/Desktop in the vm. README.txt and setup.sh are under ~/ and came with the image. Here for illustration.
if [ "" == "$1" ]; then echo "Usage: build_pims.sh [arm|x86]"; exit 1; fi
cd -P `dirname $0`/pims;
pwd;
scripts/reallyclean.sh &&
echo "gen" &&
scripts/"runqmake-$1" &&
echo "record number" &&
scripts/buildnumber &&
echo "make" && make -s
db/schema.rb merge=railsschema
@tsnow
tsnow / README.md
Created February 1, 2013 19:00
Ridecharge C# JSON Parsing Assignment

Spend 5 literal minutes thinking about:

  • How much time you have to devote to this exercise?
  • How can you verify that your solution is correct?

Then:

  1. Fork this gist and clone it locally.
  2. Send tsnowhite@taximagic.com and aharris@taximagic.com a link to your forked gist, along with an estimate of how long the solution should take in man-hours and an estimate of when you will be finished.
  3. Complete the exercise.
library("optparse")
option_list <- list(
make_option(c("-p", "--no_png"), action="store",default='TRUE')
)
args <- parse_args(OptionParser(option_list = option_list))
no_png <- args$no_png == "TRUE"
f <- file("stdin")
sudo yum install git
#need IAM credentials for read for all services, see https://github.com/Netflix/edda/wiki/AWS-Permissions
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_KEY=xxx
export JAVA_OPTS="-XX:MaxPermSize=256M -Xmx1g"
git clone git://github.com/Netflix/edda.git
cd edda
./gradlew build
cd ..
wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.3.tgz
@tsnow
tsnow / resque.sh
Created October 28, 2013 07:01 — forked from cwise/resque.sh
#!/bin/sh
#
# This script starts and stops the Resque daemon
# This script belongs in /engineyard/bin/resque
#
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:$PATH
CURDIR=`pwd`
usage() {