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 / 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 / regular-expressions.md
Created November 16, 2012 20:14
My commonly used regular expressions

##Find/Replace tag attributes

###everything between <a >

<div/?[a\s]*[^>]*>

###everything between

href="/?[a\s]*[^>]*?" 
@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);
@jonschlinkert
jonschlinkert / markdown-cheatsheet.md
Last active April 23, 2025 17:58
A better markdown cheatsheet.
@jonschlinkert
jonschlinkert / basic.md
Created August 25, 2013 22:49
Different Gruntfile configurations for Assemble.
module.exports = function(grunt) {
  // Project configuration.
  grunt.initConfig({
    // Build HTML from templates and data
    assemble: {
      options: {
        flatten: true,
        assets: 'dist/assets',
 partials: ['templates/includes/*.hbs'],
/**
* Handlebars Helpers for Pattern Lab
* Copyright (c) 2014 Jon Schlinkert
* Licensed under the MIT License (MIT).
*/
'use strict';
var path = require('path');
var file = require('fs-utils');
var _ = require('lodash');