Skip to content

Instantly share code, notes, and snippets.

View poshboytl's full-sized avatar
🦄
You may say I'm a dreamer, but I'm not the only one...

Terry Tai poshboytl

🦄
You may say I'm a dreamer, but I'm not the only one...
View GitHub Profile
@poshboytl
poshboytl / jquery.tinypubsub.coffee
Created May 11, 2012 15:52 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.(coffee)
$.subscribe = (event, handle) ->
if not o[event]
o[event] = []
o[event].push handle
true
$.unsubscribe = (event) ->
if o[event]
delete o[event]
@poshboytl
poshboytl / gist:1494082
Created December 18, 2011 18:17
Track the status and trigger buid for hudson CI
# Track the status and trigger buid for hudson CI.
#
# ci list all/projects - list all the projects on Hudson
# ci status <project name> - see a project's status
# ci build <project name> - triger a build on hudson
Http = require 'http'
QS = require 'querystring'
module.exports = (robot) ->
@poshboytl
poshboytl / about.md
Created August 10, 2011 01:07 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
module AfterCommit
def self.included(base)
base.class_eval do
[:save, :save!].each do |method|
alias_method_chain method, :after_commit
end
end
base.define_callbacks :after_commit, :after_commit_on_create
end
module AfterCommit
def self.included(base)
base.class_eval do
[:save, :save!].each do |method|
alias_method_chain method, :after_commit
end
end
base.define_callbacks :after_commit, :after_commit_on_create
end