Skip to content

Instantly share code, notes, and snippets.

View anildigital's full-sized avatar
:octocat:

Anil Wadghule anildigital

:octocat:
View GitHub Profile
@tarcieri
tarcieri / pmap_fetch_benchmark.rb
Created May 11, 2011 06:28
Concurrent HTTP fetching benchmark with Enumerable#pmap
require 'celluloid'
require 'open-uri'
require 'cgi'
require 'benchmark'
module Enumerable
def pmap(&block)
futures = map { |elem| Celluloid::Future(elem, &block) }
futures.map { |future| future.value }
end
@ryanb
ryanb / rails_3_1_rc4_changes.md
Created May 6, 2011 01:10
The Changelogs for Rails 3.1 Beta 1

Railties 3.1 RC4

  • The new rake task assets:clean removes precompiled assets. [fxn]

  • Application and plugin generation run bundle install unless --skip-gemfile or --skip-bundle. [fxn]

  • Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]

  • Template generation for jdbcpostgresql #jruby [Vishnu Atrai]

@kaiwren
kaiwren / gist:957742
Created May 5, 2011 19:41
Quote from the Buddha

From http://everything2.com/title/nontheist

The Buddha is the first historically known nontheist. Most Buddhists are nontheist.

The Buddha was often asked whether God existed. Usually, he replied with a complete silence. Once, however, he told the story of the man shot by a poisoned arrow.

When the doctor came and wanted to pull the arrow out of the wound, the man grabbed the doctor's hand and asked:

"Before you start treating me, Doctor, tell me, who was it that shot me? Was he of warrior class or some other class? Was he tall or was he short? Was he young or was he old? Was he dark skinned or light skinned?"

@anildigital
anildigital / config.ru.rb
Created April 21, 2011 06:21 — forked from brianmario/config.ru.rb
minimal rails3 app
require 'action_controller'
Router = ActionDispatch::Routing::RouteSet.new
Router.draw do
root :to => 'site#index'
end
class SiteController < ActionController::Metal
def index
self.response_body = "waddup son"
@brianmario
brianmario / config.ru.rb
Created April 21, 2011 06:11
minimal rails3 app
# minimal rails3 app
require 'action_controller'
Router = ActionDispatch::Routing::RouteSet.new
Router.draw do
root :to => 'site#index'
end
class SiteController < ActionController::Metal
@sreeix
sreeix / app.js
Created April 20, 2011 18:58
Node JS. chat client.
var http = require('http'),
express = require("express"),
sys = require("sys"),
io = require('socket.io');
var app = express.createServer();
app.set('view engine', 'jade');
app.get("/", function(req, res){
@sstephenson
sstephenson / config.ru
Created April 8, 2011 04:46
Rackup file for Rails 2.3 apps
require File.dirname(__FILE__) + '/config/environment'
run ActionController::Dispatcher.new
@anildigital
anildigital / nuke.rb
Created February 6, 2011 17:06 — forked from radar/nuke.rb
require 'rubygems'
require 'mechanize'
require 'httparty'
# Ugly code, for an ugly hack.
# Hey, if Lighthouse didn't suck then none of this would happen.
# It's been lotsa fun coding it though, so I suppose I should be thankful for the "opportunity"
@bryanl
bryanl / campfire-emoji.txt
Created January 27, 2011 16:34
campfire emoji
Surround these with : e.g. :calling:
+1
-1
bulb
calling
clap
cop
email
feet
@mig
mig / init.el
Created January 18, 2011 21:00
Simple Emacs 24 configuration for Rails development
;; emacs configuration
(push "/usr/local/bin" exec-path)
(add-to-list 'load-path "~/.emacs.d")
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(setq inhibit-startup-message t)