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
function updateData() { | |
for (i=0; i<2; i++) { | |
chart.series[i == 0 ? 1 : 0].setData(thedata[roundNum][i]); | |
} | |
if (roundNum < thedata.length-1) { | |
roundNum++; | |
} | |
setTimeout(updateData, 15); | |
} |
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 | |
# Usage: enforcer.sh | |
curfew_active=`curl -s http://superego.herokuapp.com/api/v1/curfew/is_active` | |
curfew=`curl -s http://superego.herokuapp.com/api/v1/curfew/compute` | |
now=`date` | |
if [ $curfew_active == 'true' ] | |
then |
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
i have been shaking my head a lot the last 36 hours. first thing i | |
would say, michael and brad, shame on both of you for falsely accusing | |
literally thousands of people and possibly scaring millions of | |
investors in an effort to promote a business model. sue, it's a very, | |
very old tactic to try to build a business on the planks of fear, | |
mistrust and accusation. this has certainly taken that to a new | |
level. it reflects either an unwillingness -- a continued lack of | |
understanding about how the market operates or just unwillingness to | |
acknowledge it, because you're trying to launch a new business and you | |
want to get volunteer platform. let me try to weigh in here. you are |
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
1 Jumping Jacks | |
2 Push ups | |
3 Standing T | |
4 Bicep curl | |
5 Bar on shoulders | |
6 Bar over head | |
7 Sit ups | |
8 Triceps | |
9 Bench press | |
10 Plank |
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
bash-3.2$ wget -q https://dl.dropboxusercontent.com/u/556553/put_things_here/s2protocol_issue.SC2Replay | |
bash-3.2$ python ./show_tracker_gameloops.py s2protocol_issue.SC2Replay | |
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 18, 160, 160, 226, 258, 290, 290, 290, 292, 320, 320, 435, 480, 480, 498, 498, 498, 498, 563, 640, 640, 707, 707, 707, 723, 738, 793, 800, 800, 834, 866, 960, 960, 978, 1120, 1120, 1123, 1123, 1123, 1123, 1124, 1138, 1138, 1138, 1176, 1193, 1218, 1265, 1280, 1280, 1376, 1395, 1395, 1395, 1396, 1 |
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
<Response> | |
<Dial> | |
<Conference waitUrl="http://twimlets.com/holdmusic?Bucket=com.twilio.music.electronica" waitMethod="GET">d41d8cd98f00b204e9800998ecf8427e</Conference> | |
</Dial> | |
</Response> |
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/bin/env ruby | |
# Usage conf.rb <number> | |
# | |
# Will call the number, repeatedly if necessary, and join them to a conference call when they join. | |
require 'rubygems' # not necessary with ruby 1.9 but included for completeness | |
require 'twilio-ruby' | |
# put your own credentials here |
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
# returns value in decimal hours (e.g. 23.5 = 11:30pm) | |
def self.compute_curfew(user, verbose = false) | |
targetHoursSleep = 7.5 | |
targetMinutesSleep = targetHoursSleep * 60 | |
minutesSleptType = ObservationType.find_by!(name: "minutes_slept_jawbone") | |
curfewType = ObservationType.find_by!(name: "curfew") | |
lastSleepObservation = DailyObservation.retrieve(minutesSleptType, { beforeDate: Date.today, user: user }).last |
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
# returns value in decimal hours (e.g. 23.5 = 11:30pm) | |
def self.compute_curfew(user, verbose = false) | |
targetHoursSleep = 7.5 | |
targetMinutesSleep = targetHoursSleep * 60 | |
minutesSleptType = ObservationType.find_by!(name: "minutes_slept_jawbone") | |
curfewType = ObservationType.find_by!(name: "curfew") | |
lastSleepObservation = DailyObservation.retrieve(minutesSleptType, { beforeDate: Date.today, user: user }).last |
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
was:~ david$ wget 37.187.205.99 | |
--2016-04-16 21:52:57-- http://37.187.205.99/ | |
Connecting to 37.187.205.99:80... connected. | |
HTTP request sent, awaiting response... 301 Moved Permanently | |
Location: http://lichess.org/ [following] | |
--2016-04-16 21:52:58-- http://lichess.org/ | |
Resolving lichess.org... 37.187.205.99 | |
Reusing existing connection to 37.187.205.99:80. | |
HTTP request sent, awaiting response... 303 See Other | |
Location: http://en.lichess.org/ [following] |
OlderNewer