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
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script src="walkthrough.js"></script> | |
<link rel="stylesheet" href="walkthrough.css" /> | |
<body> | |
<div class='walkthrough-container'> | |
<div class="walkthrough-steps"> | |
<div |
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
- (void) makeSparkRequest { | |
NSString *sparkApi = @"https://api.spark.io/v1/devices"; | |
NSString *deviceId = @"<YOUR_DEVICE_ID>"; | |
NSString *functionName = @"<YOUR_FUNCTION_NAME>"; // registered to cloud using Spark.function("FUNCTION_NAME", FUNCTION); | |
NSString *accessToken = @"<YOUR_ACCESS_TOKEN>"; | |
NSURL *url = [NSURL URLWithString: [NSString stringWithFormat:@"%@/%@/%@\?access_token=%@", | |
sparkApi, | |
deviceId, |
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
/* Raw IR decoder sketch! | |
This sketch/program uses the Arduno and a PNA4602 to | |
decode IR received. This can be used to make a IR receiver | |
(by looking for a particular code) | |
or transmitter (by pulsing an IR LED at ~38KHz for the | |
durations detected | |
Code is public domain, check out www.ladyada.net and adafruit.com | |
for more tutorials! |
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
TextInput = React.createClass | |
propTypes: | |
className: React.PropTypes.string, | |
id: React.PropTypes.string, | |
placeholder: React.PropTypes.string, | |
onSave: React.PropTypes.func.isRequired, | |
value: React.PropTypes.string | |
getInitialState: -> | |
value: @props.value or '' |
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
# xcode command line tools are gone | |
# reinstall them | |
xcode-select --install | |
# Pow is broken, update to 0.5.0 | |
curl get.pow.cx | sh | |
# PG is broken, Yosemite removes needed dirs | |
# http://stackoverflow.com/questions/25970132/pg-tblspc-missing-after-installation-of-os-x-yosemite-beta | |
mkdir /usr/local/var/postgres/pg_tblspc |
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
$(document).ready(function() { | |
var $body = $('body'); //Cache this for performance | |
var setBodyScale = function() { | |
var scaleSource = $body.width(), | |
scaleFactor = 0.9, | |
maxScale = 1000, | |
minScale = 30; | |
var fontSize = scaleSource * scaleFactor; |
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
layout proc {|controller| controller.request.xhr? ? false : "application" } | |
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
require 'nokogiri' | |
cnet = ARGV[0] | |
raw = `curl -d "cnetid=#{cnet}&commit=Search" http://directory.uchicago.edu/` | |
doc = Nokogiri::HTML( raw ) | |
name = doc.xpath('//td[@headers="fullname"]').text | |
puts name |
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
f = File.open("dist.all.last", 'r') | |
full = [] | |
h = {} | |
last = 0 | |
while( line = f.gets ) | |
data = [] | |
line.split(" ").each {|x| data << x} | |
full << data | |
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
# TODO html/jquery for getting all the points on the route | |
require 'yaml' | |
require 'json' | |
require 'open-uri' | |
require 'redis' | |
ROUTE = 1000299 | |
ERROR = 0.0001 #This is radial wiggle room for arriving buses, in lat/lng |
OlderNewer