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
@jonschlinkert
jonschlinkert / grunt_growl.js
Created October 22, 2012 02:25 — forked from FGRibreau/grunt_growl.js
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'
});
});
@jonschlinkert
jonschlinkert / gist:4007536
Created November 3, 2012 14:33 — forked from axelhzf/gist:3192614
Grunt-reload monitorizar multiples archivos
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
less: {
all: {
src: '*.less',
dest: 'style.css'
}
},
@jonschlinkert
jonschlinkert / domToPre.js
Created November 6, 2012 16:57 — forked from dpashkevich/domToPre.js
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
@jonschlinkert
jonschlinkert / gist:4064483
Created November 13, 2012 07:30 — forked from hileon/gist:1311735
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@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 / javascript-developer-needed.md
Created November 15, 2012 19:50 — forked from doowb/gist:4064157
Client Side Javascript Developer

Looking for a client side javascript developer who can use knockout.js to help build the front end of our application. To show off your skills, we would like the html/css and javascript components of Twitter's Bootstrap library turned into templates that would be useful with knockout.js. Things will get much more interesting after that.

Example alert:

<div data-bind="attr: { class: type }">
  <button type="button" class="close" data-dismiss="alert">×</button>
  <!-- ko data-bind="text: message" -->
  <strong>Warning!</strong> Best check yo self, you're not looking too good.
  <!-- /ko -->
</div>
@jonschlinkert
jonschlinkert / grunt.js
Created November 17, 2012 23:24 — forked from dannygarcia/grunt.js
Sample grunt-jekyll grunt.js
// Sample grunt-jekyll grunt.js file
// https://github.com/dannygarcia/grunt-jekyll
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
jekyll: {
/**
* Task: attach_heads
* Description: Set the heads for all themes declared in themes.json
*/
module.exports = function(grunt) {
'use strict';
var fs = require('fs');
var path = require('path');
var helperList = ['a', 'b', 'c', 'd', 'e'];
var documentedList = ['a', 'c'];
var undocumentedList = [];
helperList.forEach(function(helper) {
if(_.contains(documentedList, helper) === false) {
undocumentedList.push(helper);
}
});
@jonschlinkert
jonschlinkert / 0_reuse_code.js
Last active February 3, 2018 05:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console