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 'formula' | |
class JasmineNode < Formula | |
homepage 'https://github.com/mhevery/jasmine-node' | |
url 'https://github.com/mhevery/jasmine-node/archive/1.14.5.tar.gz' | |
sha1 'd4f4776476a114ba6a1d0d368cdb4988d39e4cf0' | |
depends_on "node" | |
def install |
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 'formula' | |
class Snowcrash < Formula | |
homepage 'http://apiblueprint.org' | |
head 'https://github.com/apiaryio/snowcrash.git', :tag => 'v0.12.1' | |
def install | |
system "./configure" | |
system "make", "snowcrash" | |
bin.install Dir["bin/snowcrash"] |
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 node --harmony | |
/** | |
* Creates an http server that responds to a POST with a JSON payload ({ id: "<string>" }). | |
* | |
* Example: | |
* | |
* % ORIGIN='http://127.0.0.1:8000' ./server.js | |
* //=> service running @ http://127.0.0.1:3000/echo | |
* //=> Access-Control-Allow-Origin: http://127.0.0.1:8000 |
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
/** | |
* CSS3 Border-Radius with Border - Circle Avatars | |
*/ | |
/* General Styles */ | |
body { | |
background: url(http://subtlepatterns.com/patterns/white_texture.png); | |
font: 100 14px sans-serif; | |
color: #444555; text-shadow: 0 2px white; |
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
var selectn = require('selectn'); | |
var talk = { | |
info: { name: 'Go Ahead, Make a Mess' } | |
}; | |
var talk = selectn('info.name', talk); | |
console.log(talk); |
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
macro makeString { | |
case { _ $tok } => { | |
return [makeValue(#{$tok}[0].token.value, #{here})] | |
} | |
} | |
macro qw { | |
rule { ($delimited ...) } => { [$(makeString $delimited) (,) ...] } | |
} |
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.exports = spacify; | |
/** | |
* Separate characters in a string with a space. | |
* | |
* @param {String} str | |
* string to transform. | |
* | |
* @return {String} | |
* Space separated string. |
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 isMod0(a, b) { | |
return a % b === 0; | |
} | |
function fb(n) { | |
var out = ''; | |
if (isMod0(n, 3)) out += 'Fizz'; | |
if (isMod0(n, 5)) out += 'Buzz'; |
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
var idx = -1; | |
var end = 10; | |
function eventually(fn, timeout) { | |
setTimeout(fn, timeout); | |
} | |
while (++idx < 10) { | |
eventually(console.log.bind(console, idx)); | |
} |