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 Lion extends Animal | |
eat: (food, cb)-> | |
cb() |
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
sys = require 'sys' | |
class timeouttest | |
_interval = null | |
constructor: () -> | |
@callback() | |
@_interval = setInterval @callback, 2000 | |
#@_interval = setInterval (=>@callback), 2000 |
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
result = [] | |
while m = imagesPattern.exec(bod) | |
result.push(m[1]) |
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
ds = {} | |
ds['pet'] = 'dog' | |
ds['food'] = 'meat' | |
ds2 = { | |
'pet':'dog', | |
'food':'meat' | |
} |
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
result = {} | |
replies.forEach (k) -> | |
client.hgetall k, (err, obj) -> | |
console.dir obj | |
result[obj.ref] = obj | |
#wait until done... | |
cb(null, result) |
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 result; | |
result = {}; | |
client.keys('article:*', function(err, replies) { | |
replies.forEach(function(k) { | |
client.hgetall(k, function(err, obj) { | |
result[obj.ref] = obj; | |
}); | |
}); | |
}); |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
TemplateCache = { | |
get: function(selector){ | |
if (!this.templates){ this.templates = {}; } | |
var template = this.templates[selector]; | |
if (!template){ | |
template = $(selector).html(); | |
// precompile the template, for underscore.js templates | |
template = _.template(template); |
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 Str | |
constructor: (@str) -> |
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 XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<style type="text/css"> |
OlderNewer