Skip to content

Instantly share code, notes, and snippets.

View jonschlinkert's full-sized avatar
🤔
Trying to stay in the right branch of the wave function.

Jon Schlinkert jonschlinkert

🤔
Trying to stay in the right branch of the wave function.
View GitHub Profile
@FGRibreau
FGRibreau / grunt_growl.js
Created June 6, 2012 09:10
How to get Growl notifications from Grunt.js
/* Inside grunt.js file (don't forget to add "growl" as a project dependency) */
grunt.utils.hooker.hook(grunt.fail, "warn", function(opt) {
require('growl')(opt.name, {
title: opt.message,
image: 'Console'
});
});
@dpashkevich
dpashkevich / Directory structure
Created October 8, 2012 10:24
Grunt setup for a big project
Directory structure
SubModule/
css/
...
js/
...
images/
...
@jonschlinkert
jonschlinkert / gist:4064484
Created November 13, 2012 07:30 — forked from vinhnx/gist:3510004
Sublime Text 2 - Useful Shortcuts [Windows version]

Sublime Text 2 – Useful Shortcuts (Windows)

General

ctrl+T go to file
ctrl+⌃P go to project
ctrl+R go to methods
⌃G go to line
ctrl+KB toggle side bar
ctrl+shift+P command prompt
@jonschlinkert
jonschlinkert / monokai-markdown.tmTheme
Created December 25, 2012 21:03
Sublime Text 2, Monokai with support for Markdown
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai Soda</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@jonschlinkert
jonschlinkert / .lessrc
Last active December 11, 2015 13:38
testing grunt-contrib-less with external options
{
"compile": false,
"compress": false,
"noIDs": true,
"noJSPrefix": true,
"noOverqualifying": true,
"noUnderscores": true,
"noUniversalSelectors": true,
"zeroUnits": true,
"strictPropertyOrder": true,
@jonschlinkert
jonschlinkert / externalized.md
Last active December 14, 2015 14:39
Externalize options for the grunt-recess task. This works for other tasks as well.

We can move those options into an external JSON file, .recessrc, like this:

{
  "compile": true,
  "compress": false,
  "noIDs": true,
  "noJSPrefix": true,
  "noOverqualifying": true,
  "noUnderscores": true,
 "noUniversalSelectors": true,
@jonschlinkert
jonschlinkert / less-css-browser-options.md
Created March 14, 2013 05:21
preparing some docs for the website and wiki

Browser Options

You can set options by setting things on a global LESS object before the script:

<!-- set options before less.js script -->
<script>
  less = {
    env: "development",
		async: false,
 fileAsync: false,
/**
* Relative path
* Returns the derived relative path from one to the other.
*
* Usage:
* {{relative from to}}
*/
Handlebars.registerHelper('relative', function(from, to) {
var relativePath = path.relative(from, to);
@dpashkevich
dpashkevich / domToPre.js
Created November 6, 2012 11:41
DOM tree to Pre converter
/**
* See https://github.com/sellside/pre
*/
/**
* References/todos:
* http://www.lemoda.net/javascript/dump-dom/dump-dom.html
* http://www.howtocreate.co.uk/tutorials/javascript/dombasics
* Use treewalker or nodefilter??
* https://developer.mozilla.org/en-US/docs/DOM/NodeFilter