Skip to content

Instantly share code, notes, and snippets.

View tomlane's full-sized avatar
🏠
Working from home

Tom Lane tomlane

🏠
Working from home
View GitHub Profile
/***************************************************************************
* FeatureLogger - Saves features detected by Modernizr to google analytics
***************************************************************************/
(function () {
var _gaq = _gaq || [],
Modernizr = Modernizr || {};
for(testName in Modernizr) // For every Modernizr test
if(typeof Modernizr[testName] === 'boolean') // If it is a boolean
_gaq.push(['_trackEvent', 'modernizr', testName, ((Modernizr[testName]) ? 'Yes' : 'No')]); // Log a yes or no
})();
C:\Users\Lenovo\Dropbox\Webdev\Projects\yo> yo webapp
Error webapp
Invalid namespace: webapp (or not yet registered).
Registered: 4 namespace(s). Run with the `--help` option to list them.
C:\Users\Lenovo\Dropbox\Webdev\Projects\yo> yo webapp --help
Usage: yo GENERATOR [args] [options]
General options:
-h, --help # Print generator's options and usage
C:\Users\Lenovo\Dropbox\Webdev\Projects\yo> yo webapp
Error webapp
Invalid namespace: webapp (or not yet registered).
C:\Users\Lenovo\Dropbox\Webdev\Projects\generator>mocha test/
...path.existsSync is now called `fs.existsSync`.
.. create write/to/bar.js
create write/to/foo.js
create write/to/lodash.js
..... create write/to/foobar.js
. create write/to/from-template.js
create foo-template.js
create write/to/from-template-bar.js
This file has been truncated, but you can view the full file.
4002 silly gunzTarPerm extractEntry test/zz-cleanup.js
4003 silly gunzTarPerm modified mode [ 'test/zz-cleanup.js', 438, 420 ]
4004 silly gunzTarPerm extractEntry test/fixtures.tgz
4005 silly gunzTarPerm modified mode [ 'test/fixtures.tgz', 438, 420 ]
4006 silly lockFile 4bca46d0-inherits-1 inherits@1
4007 silly lockFile 6b025e09-winston-0-6-2 winston@0.6.2
4008 silly gunzTarPerm extractEntry test/sync.js
4009 silly gunzTarPerm modified mode [ 'test/sync.js', 438, 420 ]
4010 silly gunzTarPerm extractEntry test/umask.js
4011 silly gunzTarPerm modified mode [ 'test/umask.js', 438, 420 ]
@tomlane
tomlane / gist:3725600
Created September 14, 2012 23:32
Play "push it" by salt n pepa when pushing with Git, BECAUSE WHO DOESN'T WANT THAT?!
#Linux GNOME
alias git-push="gnome-open 'http://www.youtube.com/watch?v=YleXlgHI1oM' && git push"
#OS X
alias git-push="open 'http://www.youtube.com/watch?v=YleXlgHI1oM' && git push"
➜ yeoman git:(audit-script) ✗ ./setup/audit.sh
✓ *curl* is present, whew.
✓ *git* is installed, nice one.
✓ *NodeJS* is installed.
✓ *Ruby* is installed.
✓ *RubyGems* is installed.
✓ *Compass* is installed.
✓ *Phantomjs* is installed.
✓ *jpeg-turbo* is installed.
// Define color schemes quickly
// Color schemes to choose from
// complement
// triad
// tetrad
// analogic
// accented-analogic
$color-location: primary !default
@tomlane
tomlane / gist:3190614
Created July 27, 2012 21:44 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@tomlane
tomlane / gist:3078788
Created July 9, 2012 20:46 — forked from shrwnsan/gist:2860805
Sublime Text 2 - Fetch Settings
{
"files":
{
"jquery" : "http://code.jquery.com/jquery.js",
"jquery.min" : "http://code.jquery.com/jquery.min.js",
"jquery-cookie" : "https://raw.github.com/carhartl/jquery-cookie/master/jquery.cookie.js",
"jquery-dotimeout" : "https://raw.github.com/cowboy/jquery-dotimeout/master/jquery.ba-dotimeout.min.js",
"jquery-extra-selectors" : "https://raw.github.com/keithclark/JQuery-Extended-Selectors/master/jquery-extra-selectors.js",
"jquery-flexslider" : "https://raw.github.com/mbmufffin/FlexSlider/master/jquery.flexslider-min.js",
"jquery-mediaelement" : "https://raw.github.com/johndyer/mediaelement/master/build/mediaelement-and-player.js",