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><body> | |
<h1>Find a Unique Username</h1> | |
<p>With a limit of 15 characters</p> | |
<form method="get"> | |
<label>First Name <input name="first_name" /></label> | |
<label>Last Name <input name="last_name" /></label> | |
<label>Quit after <input name="end" value="111" /></label> |
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 LinkedList[T] { | |
private var head : Node = _ | |
def insert(key : String, value : T) { | |
if (head == null) { | |
head = new Node(key, value) | |
} else { | |
var node : Node = head | |
while (node.next != null) { | |
node = node.next |
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
from contextlib import contextmanager | |
@contextmanager | |
def save(obj, attrs=None): | |
"""Save attributes of an object, then restore them. | |
Example: | |
import breakfast | |
with save(breakfast, ('eggs', 'bacon')): | |
breakfast.Eggs = lambda: "Eggs" |
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 re | |
def country_finder(adj): | |
f = open('Acarnania.txt') | |
countries = [] | |
for line in f: | |
results = re.split(',' , line.strip()) | |
if len(results) >=2: | |
countries.append(results) | |
print countries |
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 fs = require('fs'), | |
path = require('path'), | |
glob = require('glob').glob; | |
exports = module.exports = function jam(options) { | |
options = options || {}; | |
var patterns = options.patterns || []; | |
var root = options.root || path.join(__dirname, 'public'); | |
var namespace = options.namespace || 'JST'; | |
var output = options.output || path.join(root, 'jst.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
good discussion at | |
http://www.last.fm/group/Steampunk/forum/42787/_/376230 | |
some interesting first starts | |
http://sites.google.com/site/chinasteamengine/ | |
http://www.lifesdecay.com/Home/Home.html | |
your life will get very strange for a little while after clicking this link | |
http://www.youtube.com/watch?v=cycXIYdFGsQ |
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
input: | |
one | |
two | |
three | |
a | |
b | |
c |
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
"""Takes a list of files under bazaar version control and lists path and | |
timestamp of last commit. | |
Usage: bzr_tip.py $(find . -name "*.py") | sort -n | |
line output format is <timestamp> <file>@<last revision> | |
""" | |
import sys |
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
(venv)[matt@dhcp-179:cloudscaling/aws-compat]$ cat !$ (09-12 20:48) | |
cat .git/config | |
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
[remote "origin"] | |
url = [email protected]:cloudscaling/aws-compat.git |
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 express = require('express') | |
var app = express.createServer(); | |
app.get('/pass', function(req, res){ | |
res.send({foo: 'bar'}); | |
}); | |
app.get('/fail', function(req, res){ |
OlderNewer