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
# | |
#!optional | |
#!rest | |
#( | |
#\ | |
#\altmode | |
#\backnext | |
#\backspace | |
#\call | |
#\linefeed |
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
Array.prototype.reduce = this.ArrayReduce || Array.prototype.reduce | |
var console = window.console | |
var global = this | |
function assert(actual, expected) { | |
if (arguments.length < 2 && actual) | |
return actual | |
if (actual === expected) | |
return actual | |
if (JSON.stringify(actual) == JSON.stringify(expected)) | |
return JSON.stringify(actual) |
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
# Sudoku solver in CoffeeScript based on the Python solution by Peter Norvig | |
# http://norvig.com/sudoku.html | |
# 2011-04-19 [email protected] | |
# | |
# Throughout this program we have: | |
# r is a row, e.g. 'A' | |
# c is a column, e.g. '3' | |
# s is a square, e.g. 'A3' | |
# d is a digit, e.g. '9' | |
# u is a unit, e.g. ['A1','B1','C1','D1','E1','F1','G1','H1','I1'] |
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
""" | |
A redis autocomplete example for multi-word phrases. | |
Based on: | |
Ruby original: http://gist.github.com/574044 | |
Python original: https://gist.github.com/577852 | |
See options below for usage | |
Requires http://github.com/andymccurdy/redis-py/ |