Skip to content

Instantly share code, notes, and snippets.

/*!
* jQuery Tiny Pub/Sub - v0.6 - 1/10/2011
* http://benalman.com/ see https://gist.github.com/661855
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*
* (removed pre 1.4.3 support, added $.pubsubdebug())
*/
@isao
isao / LICENSE.txt
Created October 19, 2011 05:13 — forked from tomkp/LICENSE.txt
140byt.es -- sparklines!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@isao
isao / jquery.ba-tinypubsub.js
Created December 16, 2011 17:57 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
@isao
isao / brew-services.rb
Created January 31, 2012 05:45 — forked from lwe/brew-services.rb
External script for homebrew to simplify starting services via launchctl, out of the box support for any formula which implements #startup_plist.
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
#
# ## SYNOPSIS
#
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>
@isao
isao / jquery.commafy.js
Created March 9, 2012 06:14 — forked from mahalie/jquery.commafy.js
jQuery commafy
/* COMMAFY
* Simple helper function to add commas to any number
* Requires jQuery, via @cowboy
*/
function commafy(n) {
var n = n || 0;
n = (n+'').split('.').map(function(s,i){return i?s:s.replace(/(\d)(?=(?:\d{3})+$)/g,'$1,')}).join('.');
return n;
}
@isao
isao / git-pullrequest.sh
Created June 6, 2012 17:57 — forked from CyberShadow/git-pullrequest.sh
Easy GitHub pull requests
#!/bin/bash -e
# based on Vladimir Panteleev's https://gist.github.com/1885859
die() {
echo "$@" >&2
exit 1
}
branch=$(git name-rev --name-only HEAD 2>/dev/null)
ghusr=$(git config --get github.user)
@isao
isao / gitio
Created June 20, 2012 05:30 — forked from defunkt/gitio
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
url = ARGV[0]
code = ARGV[1]
@isao
isao / gist:3152563
Created July 20, 2012 18:55 — forked from haad/gist:1696065
proxychains4 homebrew formula
require 'formula'
class Proxychains < Formula
homepage 'https://github.com/haad/proxychains'
url 'https://github.com/haad/proxychains/tarball/proxychains-4.0.1'
sha1 '48911bf630dd293414f94e78d7dc7b0a1386b241'
def install
system './configure', '--prefix #{prefix}'
system 'make'
@isao
isao / add_origin.sh
Created July 25, 2012 01:13
use this to add the remote origin oh github based on the cwd
#!/bin/bash
git remote add origin git@github.com:$(git config --get github.user)/$(pwd).git
@isao
isao / git-moo.pl
Created August 2, 2012 23:32 — forked from drewfish/git-moo
"git moo" show hashes and commit distances for local and remote branches
#!/usr/bin/env perl
# @drewfish https://gist.github.com/3241991
#
# Show a nice table representing the differences between
# the local repo and remotes.
#
# It is assumed that there is a direct relationship between
# the local branch names and remote branch names.
#
# TODO