Skip to content

Instantly share code, notes, and snippets.

View ryantenney's full-sized avatar

Ryan Tenney ryantenney

View GitHub Profile
@ryantenney
ryantenney / gist:3593429
Created September 2, 2012 01:33 — forked from ryantenney/gist:3582019
White House Beer Recipes
@ryantenney
ryantenney / gist:3745300
Created September 18, 2012 19:33
Twitter's list of timezones
<select id="user_time_zone" name="user[time_zone]">
<option data-offset="-36000" value="Hawaii">(GMT-10:00) Hawaii</option>
<option data-offset="-32400" value="Alaska">(GMT-09:00) Alaska</option>
<option data-offset="-28800" value="Pacific Time (US &amp; Canada)">(GMT-08:00) Pacific Time (US &amp; Canada)</option>
<option data-offset="-25200" value="Arizona">(GMT-07:00) Arizona</option>
<option data-offset="-25200" value="Mountain Time (US &amp; Canada)">(GMT-07:00) Mountain Time (US &amp; Canada)</option>
<option data-offset="-21600" value="Central Time (US &amp; Canada)">(GMT-06:00) Central Time (US &amp; Canada)</option>
<option data-offset="-18000" value="Eastern Time (US &amp; Canada)">(GMT-05:00) Eastern Time (US &amp; Canada)</option>
<option data-offset="-18000" value="Indiana (East)">(GMT-05:00) Indiana (East)</option>
<option data-offset="" value="">-------------</option>
@ryantenney
ryantenney / gist:3829417
Created October 3, 2012 19:52
Dear Yahoo BOSS/PlaceFinder: In what world is this valid JSON?
{
"bossresponse":{
"responsecode":"200",
"placefinder":{
"start":"0",
"count":"9",
"request":"flags=JC&location=Montpelier&count=10",
"result":{"quality":"40","latitude":"44.260288","longitude":"-72.576263","offsetlat":"44.260288","offsetlon":"-72.576263","radius":"5700","name": "","line1": "","line2":"Montpelier, VT","line3": "","line4":"United States","house": "","street": "","xstreet": "","unittype": "","unit": "","postal": "","neighborhood": "","city":"Montpelier","county":"Washington County","state":"Vermont","country":"United States","countrycode":"US","statecode":"VT","countycode":"WA","uzip":"05602","hash": "","woeid":"2453516","woetype":"7"},
"result":{"quality":"40","latitude":"41.585998","longitude":"-84.607101","offsetlat":"41.585998","offsetlon":"-84.607101","radius":"3800","name": "","line1": "","line2":"Montpelier, OH","line3": "","line4":"United States","house": "","street": "","xstreet": "","unittype": "","unit": "","postal": "","neighborhood": "","city":"Montpelier","coun
@ryantenney
ryantenney / gist:3848767
Created October 7, 2012 16:06
String encoding puzzle
0000000000000001000000fb0000 [null]
00000000000000040000029401014e = A
00000000000000040000029401016e = a
00000000000000040000029401016f = b
00000000000000040000029401026f6e = aa
0000000000000004000002940102706f = bb
0000000000000004000002940103706f6e = aaa
000000000000000400000294010371706f = bbb
000000000000000400000294010824742524277e2071 = password
# Derived from: http://digitalflapjack.com/blog/2012/may/09/buildnumbers/
# Assumes that you tag versions with the version number (e.g., "1.1") and then the build number is
# that plus the number of commits since the tag (e.g., "1.1.17")
echo "Updating version/build number from git..."
plist=${PROJECT_DIR}/${INFOPLIST_FILE}
desc=`git describe`
commits=`echo $desc | awk '{split($0,a,"-"); print a[2]}'`
Jenkins.instance.items.each { job ->
println job.name;
job.builds.each { build ->
if (build.result == Result.ABORTED) {
println "\t${build.number} ${build.result}: deleting"
build.delete()
}
}
}
#include <OneWire.h>
#include <SoftwareSerial.h>
float temp = -1;
float setTemp = 38;
boolean compressor = false;
boolean compressorDelayed = false;
float compressorOffTime = 0; // compressor should be off initially
const int compressorDelay = 300; // 5 minutes
#!/bin/bash
#######################################
# Graphite Install
# Run with sudo for best results
#
#######################################
if [[ "$(/usr/bin/whoami)" != "root" ]]; then
echo "This script must be run as root or using sudo.Script aborted."
exit 1
#!/bin/bash
echo "Nuking all .DS_Store files"
find . -type f -name ".DS_Store" -exec rm {} \;
@ryantenney
ryantenney / keybase.md
Created March 11, 2014 22:32
keybase.io proof

Keybase proof

I hereby claim:

  • I am ryantenney on github.
  • I am ryantenney (https://keybase.io/ryantenney) on keybase.
  • I have a public key whose fingerprint is 4C49 E201 CA40 5846 7A42 D947 7863 C523 4D13 335B

To claim this, I am signing this object: