Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block samzhao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
samzhao / gist:1991793
Created Mar 7, 2012
HTML: Starting Template
View gist:1991793
<!doctype html>
<meta charset="utf-8">
<link rel="stylesheet" href="css/style.css">
samzhao / gist:1991809
Created Mar 7, 2012
Javascript: Clever pubsub
View gist:1991809
// Works in modern browsers + IE9, but Modernizr has to polyfill baked in for function.bind.
// Hat tip Paul Irish
var o = $( {} )
$.subscribe = o.on.bind(o);
$.unsubscribe =;
$.publish = o.trigger.bind(o);
samzhao / gist:1991813
Created Mar 7, 2012
CSS: Image Replacement
View gist:1991813
.ir {
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
samzhao / gist:1991822
Created Mar 7, 2012
Javascript: jQuery pubsub
View gist:1991822
(function($) {
var o = $( {} );
on: 'subscribe',
trigger: 'publish',
off: 'unsubscribe'
}, function( key, api ) {
$[api] = function() {
o[key].apply( o, arguments );
samzhao / gist:1991844
Created Mar 7, 2012
Javascript: Link jQuery Source
View gist:1991844
<script src="" type="text/javascript" charset="utf-8"></script>
samzhao / Prettier Development
Created Oct 13, 2012
Gemfile Template with Wirble, Hirb, awesome_print, and annotate
View Prettier Development
gem('wirble', group: "development")
gem('hirb', group: "development")
gem('awesome_print', group: "development")
gem('annotate', group: "development")
samzhao / 0_reuse_code.js
Created Oct 9, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View ui-bootstrap-tpls.min.js
View .vimrc
syntax enable
colorscheme monokai
set tabstop=2
set softtabstop=2
set expandtab
set smarttab
set number
set showcmd
set cursorline
You can’t perform that action at this time.