Skip to content

Instantly share code, notes, and snippets.

@lancebecker
lancebecker / gist:7240579
Created October 30, 2013 21:26
Colored output for console.log
console.log("%c %s", "color:white;background:gray;font-size:12px",a);
@lancebecker
lancebecker / gist:7238915
Created October 30, 2013 19:41
delete remote branch
git push origin :remotebranchtodelete
@lancebecker
lancebecker / gist:6295014
Created August 21, 2013 14:16
GAQ in one data prop
<a href="#" data-track='{"category":"categoryName", "action":"click", "label":"labelName"}'>
TrackingManager.prototype._standardGaq = function(o) {
return _gaq.push(['_trackEvent', o.category, o.action, o.label]);
};

Using Yeoman default yo webapp

Running "mocha:all" (mocha) task
Testing index.html
Running PhantomJS...ERROR
Warning: PhantomJS not found. Use --force to continue.

$ npm cache clean

@lancebecker
lancebecker / gist:5034071
Created February 25, 2013 22:51
make RBENV and zsh place nice
# RBENV {{{
if which rbenv > /dev/null; then eval "$(rbenv init - zsh)"; fi
# }}}
@lancebecker
lancebecker / gist:5034055
Created February 25, 2013 22:49
ZSH: Custom chpwd()
function chpwd() {
emulate -L zsh
clear
echo $PWD
ls -H
}
@lancebecker
lancebecker / gist:4999456
Created February 20, 2013 20:46
:build Compass config to handoffs
compass_config do |config|
config.output_style = :expanded
config.line_comments = false
end
@lancebecker
lancebecker / gist:4126112
Created November 21, 2012 17:10
Set of Brew Packages to install on a fresh system
@lancebecker
lancebecker / gist:4111677
Created November 19, 2012 16:34
Syntax checkers

via: https://github.com/humiaozuzu/dot-vimrc

For syntax check tools:

Languages Lint Tools Install guide
C gcc built-in
CPP g++ built-in
CoffeeScript coffee npm install -g coffeelint
CSS csslint npm install -g csslint
@lancebecker
lancebecker / gist:1479294
Created December 15, 2011 00:37
Adding color to git output
git config --global color.ui true