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
function inherits(ctor, base) { | |
ctor.prototype = Object.create(base); | |
ctor.prototype.constructor = ctor | |
return ctor | |
} | |
function extend(tgt) { var sources | |
sources = Array.prototype.slice.call(arguments, 1) | |
sources.forEach(function(source){ | |
Object.keys(source).forEach(function(key){ | |
tgt[key] = source[key] })}) |
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
// Cross-browser object.watch and object.unwatch | |
// object.watch | |
if (!Object.prototype.watch) { | |
Object.prototype.watch = function (prop, handler) { | |
var oldval = this[prop], newval = oldval, | |
getter = function () { | |
return newval; | |
}, | |
setter = function (val) { |
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
foo | |
( | |
function( ) { | |
return bar( | |
'foo' ) ; | |
}, | |
function | |
() | |
{ | |
return 'bar' |
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
(data "title" "My Story") | |
(data "author" "Mortchek") | |
(start-page "foo") | |
(page "foo" | |
(text "You are in a place.\n") | |
(choice (go "bar") "Do a thing!\n") | |
(choice (go "baz") "Do a different thing!\n") | |
(choice (give "sword") "Pick up a sword!\n") | |
(choice (give "shield") "Pick up a shield!\n") |
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
"require github://jquery/jquery/src/intro.js" | |
"require github://jquery/jquery/src/core.js" | |
"require github://jquery/jquery/src/callbacks.js" | |
"require github://jquery/jquery/src/deferred.js" | |
"require github://jquery/jquery/src/support.js" | |
"require github://jquery/jquery/src/data.js" | |
"require github://jquery/jquery/src/queue.js" | |
"require github://jquery/jquery/src/attributes.js" | |
"require github://jquery/jquery/src/event.js" |
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
// Superpowered logging for AngularJS. | |
angular.module('logFactory', ['ng']) | |
.value('logFactory_whiteList', /.*/) | |
//.value('logFactory_whiteList', /!|.*Ctrl|run/) | |
.value('logFactory_piercingMethods', {warn:true, error:true}) | |
.factory('logFactory', ['$log', 'logFactory_whiteList' , 'logFactory_piercingMethods', function ($log, whiteList, piercing) { | |
piercing = piercing || {} |
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
"require github://Wizek/jquery/src/intro.js" | |
"require github://Wizek/jquery/src/core.js" | |
"require github://Wizek/jquery/src/callbacks.js" | |
"require github://Wizek/jquery/src/deferred.js" | |
"require github://Wizek/jquery/src/support.js" | |
"require github://Wizek/jquery/src/data.js" | |
"require github://Wizek/jquery/src/queue.js" | |
"require github://Wizek/jquery/src/attributes.js" | |
"require github://Wizek/jquery/src/event.js" |
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
MainCtrl = ($scope) -> | |
$scope.list = [4,2,1,11] | |
$scope.set = {a:1,b:1,c:1} | |
$scope.fn = (x) -> console.log(x);x |
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
git show HEAD --stat=200 | tail +7 | awk '{ print $3 " "$4 " " $1}' | sort -n -r | less |
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 python | |
import sys | |
from subprocess import Popen, PIPE | |
from json import loads | |
class Task(object): | |
def __init__(self, data): | |
self.data = data |
OlderNewer