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
// less | |
foo, bar { | |
color: black; | |
lol, &:cat { | |
font: none; | |
> a, b { | |
color: red; | |
} |
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
######################## | |
# wp2toto # | |
# by Joseph Weissman # | |
######################## | |
# config | |
author = "user" | |
wpfile = "user_blog_export.xml" | |
outdir = "../articles/" |
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 F = function () {}; | |
F.name // '' | |
F.name = "foo"; | |
F.name // '' |
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
<script src="less.js"></script> | |
<link rel="less" href="main.less" type="text/css"> |
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
// | |
// Recursively traverse a hierarchy, returning | |
// a list of all relevant .js files. | |
// | |
function paths(dir) { | |
var paths = []; | |
try { fs.statSync(dir) } | |
catch (e) { return [] } |
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
input ! click { | |
delay: 1ms; | |
} | |
! fadeOut { | |
time: 100ms; | |
} | |
input#search ! tokenize { | |
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
properties: { | |
title: { | |
type: 'string', | |
conditional: { | |
optional: { | |
value: true, | |
when: function () { // The 'optional' attribute only takes effect if this function returns true | |
return !this.published; // So the title is only optional if the article hasn't been published. | |
} |
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
vows.describe('format.js library').addVows({ | |
"Number formatting": { | |
// run this once, and execute the following tests when it completes | |
topic: 42, | |
"is the number":function(n){ | |
assert.equal(n,42); | |
} | |
} | |
}); |
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
vows.describe('format.js library').addVows({ | |
"toNumber(42)": { | |
"on an instance of Number": { | |
topic: new Number( 42 ), | |
"can format strict number":function( n ){ | |
assert.equal( true, n instanceof Number ); | |
}}, | |
"on a number literal": { | |
topic: 42, | |
"can format loose number":function( 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
map.path('/domain', function () { | |
this.get(); // match 'GET /domain' | |
this.root; // match 'GET /domain/' | |
this.get('/info'); // match 'GET /domain/info' | |
this.path('/users', function () { | |
this.post(); // match 'POST /domain/users' | |
this.get(); // match 'GET /domain/users' | |
}); | |
}) |