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
var power = function (base, exponent) { | |
if (exponent === 0) {return 1;} | |
else | |
{ return base * power(base, exponent - 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
var i = 2; | |
i--; | |
i--; | |
console.log( "i is equal to " + i ); |
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/python fillmore.py | |
Traceback (most recent call last): | |
File "fillmore.py", line 167, in <module> | |
gcal.addEvent(config.user, header['Subject']) | |
File "fillmore.py", line 143, in addEvent | |
body = event).execute() | |
File "/home/jbfink/work/fillmore/local/lib/python2.7/site-packages/apiclient/http.py", line 307, in execute | |
raise HttpError(resp, content, self.uri) | |
apiclient.errors.HttpError: <HttpError 404 when requesting https://www.googleapis.com/calendar/v3/calendars/jbfinktest/events/quickAdd?text=party+at+phil%27s+place+8pm+february+19th&alt=json returned "Not Found"> |
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
total 60 | |
drwxr-xr-x 5 jbfink jbfink 4096 2012-02-06 11:27 . | |
drwxr-xr-x 23 jbfink jbfink 4096 2012-02-06 11:24 .. | |
drwxrwxr-x 2 jbfink jbfink 4096 2012-02-06 11:16 .cache | |
-rw-rw-r-- 1 jbfink jbfink 475 2012-02-06 11:17 calendar.dat | |
-rw-rw-r-- 1 jbfink jbfink 209 2012-02-06 11:16 config.cfg | |
-rw-rw-r-- 1 jbfink jbfink 177 2012-02-06 11:15 config.cfg.example | |
-rw-rw-r-- 1 jbfink jbfink 3846 2012-02-06 12:25 fillmore.log | |
-rw-rw-r-- 1 jbfink jbfink 5425 2012-02-06 11:13 fillmore.py | |
-rwxr-xr-x 1 jbfink jbfink 89 2012-02-06 11:27 fill-run.sh |
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
// runner times | |
var carlos = [9.6,10.6,11.2,10.3,11.5]; | |
var sarah = [10.6,11.2,9.4,12.3,10.1]; | |
var timothy = [12.2,11.8,12.5,10.9,11.1]; | |
var calculateAverage = function (raceTimes) { | |
var totalTime; | |
for ( i = 0; i < raceTimes.length; i++ ) { | |
totalTime = (totalTime || 0) + raceTimes[i]; | |
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
Traceback (most recent call last): | |
File "/home/jbfink/work/fillmore/fillmore.py", line 163, in <module> | |
mailbox.read_inbox_headers() | |
File "/home/jbfink/work/fillmore/fillmore.py", line 70, in read_inbox_headers | |
self.inbox_headers.append(self.parse_message_headers(message_id)) | |
File "/home/jbfink/work/fillmore/fillmore.py", line 83, in parse_message_headers | |
fields = header.split[0][1]("\r\n") | |
AttributeError: 'list' object has no attribute 'split' |
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
Traceback (most recent call last): | |
File "/home/jbfink/fillmore/fillmore.py", line 181, in <module> | |
mailbox.read_inbox_headers() | |
File "/home/jbfink/fillmore/fillmore.py", line 72, in read_inbox_headers | |
message_body = self.parse_body(message_id) | |
File "/home/jbfink/fillmore/fillmore.py", line 120, in parse_body | |
filename = datetime.now().strftime("%s") + "-" + filename | |
NameError: global name 'datetime' is not defined |
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
Chromium 18.0.1025.151 (Developer Build 130497) Ubuntu 11.10 | |
OS Linux | |
WebKit 535.19 (trunk@106313) | |
JavaScript V8 3.8.9.16 | |
Flash 11.2 r202 | |
User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/11.10 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19 | |
Command Line /usr/lib/chromium-browser/chromium-browser --flag-switches-begin --flag-switches-end | |
Executable Path /usr/lib/chromium-browser/chromium-browser | |
Profile Path /home/jbfink/.config/chromium/Default |
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
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
ca = commit -am | |
fuckit = reset --hard | |
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
type = cat-file -t | |
dump = cat-file -p |
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
class String | |
def palindrome? | |
junk = [",", "?", "!", ".", "'", '"', " ", "@", "#", "$", "%", "^", "&", "*"] | |
a = self.split("") | |
a.delete_if { |x| junk.include?(x) } | |
a.join.downcase == a.join.reverse.downcase | |
end | |
end |