I am now updating these at https://github.com/oobrien/vis/tree/master/tube/data - specifically https://github.com/oobrien/vis/tree/master/tube/data/tfl_lines.json and https://github.com/oobrien/vis/tree/master/tube/data/tfl_stations.json
This file contains hidden or 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
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { | |
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); | |
return v.toString(16); | |
}); |
This file contains hidden or 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 php | |
<?php | |
//Don't forget to setup credentials for the AWS API. | |
require_once('/usr/lib/aws-php-sdk-1.3.1/sdk.class.php'); | |
$ec2 = new AmazonEC2(); | |
$volumes = array( | |
'vol-xxxxxxxx' => '-- Your snapshot description here --', | |
'vol-xxxxxxxx' => '-- Your snapshot description here --', | |
'vol-xxxxxxxx' => '-- Your snapshot description here --' |
This file contains hidden or 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
{ | |
"Bakerloo": "#B36305", | |
"Central": "#E32017", | |
"Circle": "#FFD300", | |
"District": "#00782A", | |
"DLR": "#00A4A7", | |
"Hammersmith and City": "#F3A9BB", | |
"Jubilee": "#A0A5A9", | |
"Metropolitan": "#9B0056", | |
"Northern": "#000000", |
This file contains hidden or 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
// NWURLConnection - an NSURLConnectionDelegate based on blocks with cancel. | |
// Similar to the `sendAsynchronousRequest:` method of NSURLConnection, but | |
// with `cancel` method. Requires ARC on iOS 6 or Mac OS X 10.8. | |
// License: BSD | |
// Author: Leonard van Driel, 2012 | |
@interface NWURLConnection : NSObject<NSURLConnectionDelegate> | |
@property (nonatomic, strong) NSURLRequest *request; | |
@property (nonatomic, strong) NSOperationQueue *queue; |
This file contains hidden or 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
/* x is the <input/> element | |
type is the type you want to change it to. | |
jQuery is required and assumed to be the "$" variable */ | |
function changeType(x, type) { | |
if(x.prop('type') == type) | |
return x; //That was easy. | |
try { | |
return x.prop('type', type); //Stupid IE security will not allow this | |
} catch(e) { | |
//Try re-creating the element (yep... this sucks) |
This file contains hidden or 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
module PI-SYNTAX | |
imports DOMAINS | |
// Processes | |
syntax Proc ::= Norm // Normal processes are still processes | |
| Proc "|" Proc // Parallel | |
| "!" Proc // Replication | |
| "(" "v" Id ")" Proc // New name | |
| "(" Proc ")" // Allow parens for grouping |
This file contains hidden or 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/sh | |
cd $1 | |
URL=`git remote -v |grep "fetch)" |awk '{print $2;}'|sed -e's#git@github.com:#http://github.com/#'|sed -e's|\.git||'` | |
open ${URL}/commit/$2 |
This file contains hidden or 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
// | |
// AppDelegate.m | |
// | |
// | |
// Created by Cory D. Wiles on 10/8/12. | |
// Copyright (c) 2013 Cory D. Wiles. All rights reserved. | |
// | |
#import "AppDelegate.h" | |
#import "iTunes.h" |
Don Norman quote from The Invisible Computer:
"Don’t ask people what they want. Watch them and figure out their needs. If you ask, people usually focus on what they have and ask for it to be better: cheaper, faster, smaller. A good observer might discover that the task is unnecessary, that it is possible to restructure things or provide a new technology that eliminates the painstaking parts of their procedures. If you just follow what people ask for, you could end up making their lives even more complicated."
OlderNewer