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: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 / 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 / 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: {
@jonschlinkert
jonschlinkert / console.html
Created November 18, 2012 23:35
grunt-reload-watch
<html>
<head>
<title>For testing javascript</title>
<script src="console.js"></script>
</head>
<body>
<p>Run grunt, then open this file at the localhost/server initialized by the gruntfile. You should now see real-time, live updates whenever you edit and save either the HTML or js file.</p>
</body>
</html>
@jonschlinkert
jonschlinkert / starter-template.html
Created November 21, 2012 05:23
bootstrap starter template with cdn assets
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Starter Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- styles -->
@jonschlinkert
jonschlinkert / alert.mustache
Created November 22, 2012 20:18
This is a partial for the alert component. It could be called alert.partial if that was beneficial for some reason.
<!-- partial -->
<div class="container">
<h1>alerts</h1>
<!-- ko foreach: alerts -->
<br>
<div data-bind="attr: { class: alertClass }">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong data-bind="text: alertType">Warning!</strong>
<!-- ko text: message -->
@jonschlinkert
jonschlinkert / Gruntfile-mustache.js
Created November 24, 2012 22:21
gruntfile for building static HTML from .mustache files. works great with bootstrap
/*global module:false*/
module.exports = function(grunt) {
'use strict';
// Project configuration
grunt.initConfig({
// Build HTML docs from .mustache files
@jonschlinkert
jonschlinkert / 1. page-with-partials.mustache
Created November 26, 2012 16:21
Five partials are referenced on this page: navbar.mustache, alert.mustache, button.mustache, modal.mustache and footer.mustache.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{title}}</title><!-- mustache tag for page title, value is specified in gruntfile -->
<!-- styles -->
<link href="styles.css" rel="stylesheet">
</head>
<body>