I heard you like Sass.
On my blog
- Building a walk function in Sass (14-04-2014)
- What to do with a Sass list (07-04-2014)
- Pushing Sass placeholders further (01-04-2014)
- Getting the most out of Sass placeholders (31-03-2014)
#!/bin/sh | |
# Use SourceGear DiffMerge as mergetool for git in cygwin. | |
# git config --global mergetool.diffmerge.cmd "diffmergetool.sh \"\$LOCAL\" \"\$REMOTE\" \"\$BASE\" \"\$MERGED\"" | |
# git config --global mergetool.diffmerge.trustExitCode false | |
# git difftool -t diffmerge branch1..branch2 | |
# Reference: http://www.tldp.org/LDP/abs/abs-guide.pdf | |
library=githelperfunctions.sh |
I heard you like Sass.
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with | |
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This | |
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise. | |
var gulp = require('gulp'), | |
spawn = require('child_process').spawn, | |
node; | |
/** | |
* $ gulp server | |
* description: launch the server. If there's a server already running, kill it. |
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |
function onlyStatic (middleware) { | |
return function (req, res, next) { | |
var match = /(\.css|\.eot|\.gif|\.html|\.js|\.png|\.svg|\.ttf|\.woff)($|\?.*$)/ig.exec(req.originalUrl); | |
if (!match) return next(); | |
middleware(req, res, next); | |
}; | |
} | |
//usage | |
this.use(onlyStatic(express.static(__dirname + "/public"))); |
/** | |
* Disable and enable event on scroll begin and scroll end. | |
* @see http://www.thecssninja.com/javascript/pointer-events-60fps | |
*/ | |
var root = document.documentElement; | |
var timer; | |
window.addEventListener('scroll', function() { | |
// User scrolling so stop the timeout | |
clearTimeout(timer); |
# Execute this in Nuget powershell console | |
get-project -all | %{ $_.Properties | ?{ $_.Name -eq "WebApplication.StartWebServerOnDebug"} | %{ $_.Value = $False } } |
// Updated requestAnimationFrame polyfill that uses new high-resolution timestamp | |
// | |
// References: | |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// https://gist.github.com/1579671 | |
// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision | |
// | |
// Note: this is my initial stab at it, *requires additional testing* | |
(function () { |