I hereby claim:
- I am schuyler on github.
- I am schuyler (https://keybase.io/schuyler) on keybase.
- I have a public key ASAmCjm9owN2COQyzkyFqy6HTyJr44Mu-26Ki_RjaF4b1Ao
To claim this, I am signing this object:
diff --git a/lib/rapidsms/router.py b/lib/rapidsms/router.py | |
index 0785499..ddecd0a 100644 | |
--- a/lib/rapidsms/router.py | |
+++ b/lib/rapidsms/router.py | |
@@ -1,7 +1,7 @@ | |
#!/usr/bin/env python | |
# vim: ai ts=4 sts=4 et sw=4 | |
-import time, datetime, os | |
+import time, datetime, os, heapq |
description "ruby_app" | |
# start on runlevel [2345] | |
# stop on runlevel [!2345] | |
expect fork | |
respawn | |
env APP_CFG=/etc/app/config | |
exec /usr/bin/thin -C /etc/app/thin.yml -R /etc/app/thin.ru start |
(defn divisible-by? [n factors] (some #(zero? (rem n %)) factors)) | |
(defn next-prime [factors] (first (drop-while #(divisible-by? % factors) (iterate inc (first factors))))) | |
(defn primes [factors] (lazy-seq (primes (cons (next-prime factors) factors)))) |
this_kind_of_error = "breaks things unexpectedly" | |
i_object = {} | |
i_object["#{this_kind_of_error}"] = "OK so far" | |
another_object = {"#{this_kind_of_error}": "this is not what I expected"} | |
""" | |
$ coffee -c unexpected_paren.coffee | |
Error: In unexpected_paren.coffee, Parse error on line 6: Unexpected '(' |
import math | |
import geohash as ghash | |
WGS84_RADIUS = 6370997.0 # meters | |
METERS_PER_DEGREE = WGS84_RADIUS * 2 * math.pi / 360.0 | |
class Point(list): | |
def __init__(self, latitude, longitude): | |
list.__init__(self, (latitude, longitude)) |
# convert Ushahidi JSON on stdin to GeoJSON on stdout | |
import json, sys | |
data = json.load(sys.stdin) | |
features = [] | |
for item in data["payload"]["incidents"]: | |
incident = item["incident"] | |
feature = { |
source .bashrc | |
if [ `hostname -s` != $MY_LAPTOP ]; then | |
# reattach or start a new screen. don't make it a login shell. | |
screen -xRR -ln | |
fi |
if env["REQUEST_METHOD"] == "GET" | |
# merge :params with the query string | |
if params = env[:params] | |
params = parse_nested_query(params) if params.is_a?(String) | |
params.update(parse_nested_query(uri.query)) | |
uri.query = build_nested_query(params) | |
end |
# Workflow: | |
# | |
# 1. feature start 000-new-feature | |
# 2. git commit -m "here's my new feature" | |
# 3. feature update | |
# 4. git commit -m "here's some tests" | |
# 5. feature diff | |
# 6. feature finish 000-new-feature | |
# 7. git push origin master |
I hereby claim:
To claim this, I am signing this object: