Skip to content

Instantly share code, notes, and snippets.

View kamal's full-sized avatar

Kamal Fariz Mahyuddin kamal

View GitHub Profile
git log --pretty=format:'%ae: %s' | ack "test|bomb|fail|conflict" | awk '{h[$1]++}END{for(i in h){print h[i],i|"sort -rn|head -20"}}' | awk '!max{max=$1;}{r="";i=s=60*$1/max;while(i-->0)r=r"#";printf "%35s %5d %s %s",$2,$1,r,"\n";}'
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="http://cloud.github.com/downloads/emberjs/ember.js/ember-0.9.3.min.js"></script>
<script src="https://raw.github.com/gist/1531917/b8fd56c2033a1629d6497eb6784177cb4658d930/ember-data.js"></script>
<script type="text/javascript">
$(document).ready(function() {
window.App = Ember.Application.create();
App.store = DS.Store.create({
adapter: DS.Adapter.create()
(function(exports) {
window.DS = SC.Namespace.create();
})({});
(function(exports) {
DS.Adapter = SC.Object.extend({
commit: function(store, commitDetails) {
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Parse Error
at Client.onData [as ondata] (http.js:1464:27)
at Client._onReadable (net.js:677:27)
at IOWatcher.onReadable [as callback] (net.js:177:10)
@kamal
kamal / baby_talk.rb
Created April 29, 2011 14:02 — forked from stympy/subscription_plan.rb
Extending a model in a Rails 3 (pre-3.1) engine
module BabyTalk
class Engine < Rails::Engine
config.to_prepare do
User.class_eval do
has_many :participations, :foreign_key => "participant_id"
has_many :rooms, :through => :participations
end
end
end
end
@kamal
kamal / gist:835811
Created February 20, 2011 07:53 — forked from sssionggg/gist:835808
* Start Small, Stay Small: A Developer's Guide to Launching a Startup
* The Art of Game Design: A book of lenses
* Do More Faster: TechStars Lessons to Accelerate Your Startup
* The No Asshole Rule: Building a Civilized Workplace and Surviving One That Isn't
* Free: The Future of a Radical Price
* Founders at Work: Stories of Startups' Early Days
* Hackers and Painters: Big Ideas from the Computer Age
* The Pragmatic Programmer: From Journeyman to Master
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>maccman.juggernaut</string>
<key>ProgramArguments</key>
<array>
function Foo() {
}
Foo.prototype = {
override_me: function() {
alert('bar');
}
}
@kamal
kamal / routes.rb
Created August 9, 2010 15:03 — forked from akomba/routes.rb
resources :channels do
shallow do
resources :posts do
member do
put :disable
put :toggle_stickiness
put :add_channel
end
resources :replies, :only => [:index, :new, :create, :show]
end
# config/environment.rb
config.gem "bitfluent-activemerchant", :lib => "activemerchant"