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> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Gunked Up Form</title> | |
<style> | |
:root { | |
--duration: 100ms; | |
} |
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
# requires https://github.com/trentm/json | |
cat npm-shrinkwrap.json | json dependencies | json --items | json -a key 'value.version' | less |
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
{ | |
"scripts": { | |
"compile": "coffee --bare --compile --output lib/ src/", | |
"test": "mocha", | |
"pretest": "npm run compile", | |
"prepublish": "npm run compile" | |
} | |
} |
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
displayName = ({ name, age }) -> | |
console.log "#{name}, #{age} year(s) old" | |
coffee> displayName name: 'Foo', age: 42 | |
Foo, 42 year(s) old |
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
{renderable, a, h1, table, td, th, tr} = require 'teacup' | |
template = renderable ({posts})-> | |
h1 'Listing posts' | |
table "#posts-table", -> | |
tr -> | |
th 'Title' | |
th 'Content' | |
for post in posts | |
tr '.post-row', -> |
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
mongoose = require 'mongoose' | |
expect = require 'expect.js' | |
db = null | |
before (done) -> | |
db = mongoose.createConnection('localhost', 'test').once('open', done) | |
describe 'Food Model', -> | |
Food = null |
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
//From https://gist.github.com/637764 | |
$(function() { | |
var gistPrefix = 'http://gist.github.com/', | |
// Cache document.write so that it can be restored once all Gists have been | |
// embedded. | |
cachedWrite = document.write, | |
wroteStyle = false, | |
body = $('body'), | |
// Map each p.gist to an object that contains the paragraph to be replaced | |
// and the Gist's identifier. |
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
[alias] | |
io = !git fetch && git log --left-right @{upstream}... |
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 broccoli = new Food({ | |
name: 'frozen broccoli', | |
organic: true | |
}); |