Skip to content

Instantly share code, notes, and snippets.

// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@kmiyashiro
kmiyashiro / layout2.jade
Created August 11, 2011 18:50 — forked from monokrome/layout2.jade
HTML5 Boilerplate Conditional comments in Jade
!!! 5
//if lt IE 7
html(class="no-js ie6 oldie", lang="en")
//if IE 7
html(class="no-js ie7 oldie", lang="en")
//if IE 8
html(class="no-js ie8 oldie", lang="en")
// [if gt IE 8] <!
html(class="no-js", lang="en")
// <![endif]
@bergie
bergie / .gitignore
Created September 19, 2011 15:50
Node.js email handling examples
config.json
reading-image.png
@olivierlacan
olivierlacan / An_example.markdown
Created February 18, 2012 05:40 — forked from renz45/An_example.markdown
Re-style Sublime Text 2 sidebar to a darker theme

This re-styles your sublime text 2 sidebar to be darker, so it doesn't blind you when using a dark theme.

Dark sublime text 2 sidebar

Save the Default.sublime-theme file into packages/Theme - Default, make a backup of your original if you want to be able to go back easily.

@davemo
davemo / express.api.js
Created September 4, 2012 21:48
An API Proxy in Express
var express = require('express'),
request = require('request'),
app = express.createServer(),
PORT = 8010;
app.configure(function() {
app.use(express.static(__dirname));
app.use(express.bodyParser());
app.use(express.errorHandler());
});
@bradwilson
bradwilson / gist:4215933
Last active August 17, 2020 16:46
.gitconfig
[user]
name = Brad Wilson
email = [email protected]
[alias]
a = add -A
abort = rebase --abort
amend = commit --amend -C HEAD
bl = blame -w -M -C
br = branch
cat = cat-file -t
@leommoore
leommoore / node_file_paths.markdown
Last active August 19, 2024 13:02
Node - File Paths

#Node - File Paths

##File Paths Node has a path module which can be used to manipulate paths.

###Normalizing Paths Paths can be stored in different ways and it is neccessary to ensure that the path is standardized.

var path = require('path');
path.normalize('/foo/bar//baz/asdf/quux/..');
@nicholascloud
nicholascloud / blog-npm-root-packages.md
Last active December 16, 2015 03:49
blog-npm-root-packages
@jcreamer898
jcreamer898 / README.md
Last active December 17, 2015 22:59
A base ko viewModel

How to use this thing...

var MyNewViewModel = ViewModel.extend({
    subscriptions: {},
    publications: {},
    defaults: {
        // ko.observable
        foo: 1,
 // ko.ovservableArrray