View open_github_commit.js
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 match = window.location.pathname.match(/([^/]+)\/([^/]+)\/commit\/([0-9a-f]{40,40})$/); | |
if (match == null) | |
console.log("Could not parse window name"); | |
var user = match[1]; | |
var repo = match[2]; | |
var commit = match[3]; | |
$.get("http://github.com/api/v2/json/commits/show/" + user + "/" + repo + "/" + commit, null, function(data) { | |
var filenames = data.commit.modified.map(function(x) { return x.filename }) |
View ks-compare-dir.py
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
import sys | |
import os | |
import filecmp | |
import subprocess | |
assert len(sys.argv) == 3, 'Usage: <script> path1 path2' | |
def run(command): | |
subprocess.call([command], shell=True) |
View appcast.js
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
/* | |
AppCast Dowloader (c) 2010 Sofa BV (Koen Bok) | |
Description: | |
Returns the url for the latest version in an AppCast url. | |
Requirements: | |
jQuery > 1.4 |
View backbone.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<script type="text/javascript" charset="utf-8" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="http://documentcloud.github.com/underscore/underscore.js"></script> | |
<script type="text/javascript" charset="utf-8" src="http://documentcloud.github.com/backbone/backbone.js"></script> |
View Constants
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
# -*- encoding: utf-8 -*- | |
constants = {} | |
constants['weightunits'] = { | |
'KG': 'Kilogram', | |
'LB': 'Pound' | |
} | |
constants['continents'] = { |
View Android Review
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
PLUS | |
- You never have to attach it to the computer, not even for software upgrades | |
- Call quality and reception is sometimes better then my iPhone | |
- The dashboard or home is really nice with widgets and shortcuts (like wifi settings) | |
- Regular mini USB cable, although iPod cables are pretty common now too | |
- I don't really feel like I miss any apps, and most standard apps are done very nicely | |
- Some stuff is really smart like having a 2 second delay for locking after the screen dims down | |
- Most of the time it feels pretty fast | |
- I feel like I have more insight in the device (which is good because I'm geeky) |
View gist:1243614
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 api = new FB.Messages(); | |
api.login("koenbok", "password", function(result) {}) | |
api.threads.fetch({limit: 100, tags: ["inbox", "unread"]}, function(results) {}) // list with threads | |
api.threads.count({limit: 100, tags: ["inbox", "unread"]}, function(results) {}) // thread count | |
api.messages.fetch({thread:thread.id}, function(results) {}) // all messages for thread | |
api.messages.put({thread:thread.id, parent:message.id ...}, function(results) {}) // send a new message |
View uilayer-bug.html
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
<html lang="en"> | |
<head> | |
<script type="text/javascript" src="http://movelang.org/move-0.4.5-rt.js"></script> | |
<script type="text/javascript" src="http://rsms.me/uilayer/uilayer.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var UILayer = Move.require("UILayer"); | |
UILayer.debug = true; |
View friendfeed.sql
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
-- http://backchannel.org/blog/friendfeed-schemaless-mysql | |
DROP TABLE IF EXISTS person; | |
DROP TABLE IF EXISTS person_index_name; | |
DROP TABLE IF EXISTS person_index_age; | |
CREATE TABLE person ( | |
key CHAR(32) NOT NULL, | |
val TEXT, | |
PRIMARY KEY (key) |
View Cactus Performance
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
16 Threads: 6.05s user 4.08s system 131% cpu 7.687 total | |
2 Threads: 4.89s user 2.25s system 122% cpu 5.822 total | |
1 Thread: 3.36s user 0.65s system 99% cpu 4.035 total |
OlderNewer