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
// Functions for ease manipulation of media-queries in stylus | |
media($q, $mediatype = '') | |
if $mediatype == '' | |
unquote("@media " + $q + "{") | |
else | |
unquote("@media " + $mediatype + " and " + $q + "{") | |
endmedia() | |
unquote("}") |
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
# Git to autodetect text files and normalise their line endings to LF when they are checked into your repository. | |
* text=auto | |
# | |
# The above will handle all files NOT found below | |
# | |
# These files are text and should be normalized (Convert crlf => lf) | |
*.php text | |
*.css text |
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
# Logs | |
*.log | |
# Runtime data | |
pids | |
*.pid | |
*.seed | |
# Directory for instrumented libs generated by jscoverage/JSCover | |
lib-cov |
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
function isEvenInner (num) { | |
if (num === 0) { | |
return true; | |
} | |
if (num === 1) { | |
return false; | |
} | |
return function() { |
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
@import compass | |
$icons: sprite-map("icons/*.png") | |
$icons-hd: sprite-map("icons-hd/*.png") | |
i | |
background: $icons | |
display: inline-block | |
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) | |
background: $icons-hd |
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
// ---- | |
// Sass (v3.3.12) | |
// Compass (v1.0.0.alpha.21) | |
// ---- | |
// Breakpoints map | |
// @type Map | |
$breakpoints: ( | |
// Regular breakpoints | |
"baby-bear": "(max-width: 500px)", |
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
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
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 mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/test'); | |
var db = mongoose.connection; | |
db.on('error', function() { | |
return console.error.bind(console, 'connection error: '); | |
}); | |
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
// Callback Hell. You and I both know it's hell. | |
// Here's a secret: Escape Callback Hell... | |
// ... by using classes, you fucking jackass. | |
// This is shit: | |
fs.readdir('tmp', function(err, list) { | |
async.map(list, function(item, cb) { | |
cb(null, item.toUpperCase()); | |
}, function(err, results) { |