Skip to content

Instantly share code, notes, and snippets.

View sheepsteak's full-sized avatar

Chris Shepherd sheepsteak

View GitHub Profile
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@domenic
domenic / README.md
Created March 29, 2012 16:01
Cross-platform git hooks for Node.js

Here's how this works:

  • Include a git_hooks/ directory in your project, with these two files (plus other hooks if you want, written in a similar style).
  • Add "npm" to your devDependencies in package.json, so that the pre-commit hook can do its magic.
  • Add test and lint scripts to your package.json, e.g.
    "scripts": {
        "test": "mocha",
 "lint": "jshint ./lib --show-non-errors"
@scottmessinger
scottmessinger / 1.router.js
Created September 21, 2011 22:29
Routing in KO with Backbone.js
App.Router = Backbone.Router.extend({
routes : {
"" : "home"
,"/" : "home"
,"!" : "home"
,"!/" : "home"
,"!/:username" : "show_user"
,":username" : "show_user"
,":username/" : "show_user"
@sgentile
sgentile / KnockoutJsHistory
Created May 13, 2011 14:32
KnockoutJS with History
<!doctype html>
<html lang="en">
<head>
<title>knockout binding test</title>
<style type="text/css">
#sidebar { float: left; width: 15em; }
#details { float: left; }
#sidebar li { list-style: none; }
#sidebar a { list-style: none; background-color: silver; width: 8em; margin-bottom: 0.5em; padding: 0.5em; display:block; }
#sidebar a.selected { background-color: Navy; color: white; }