Skip to content

Instantly share code, notes, and snippets.

View reddyonrails's full-sized avatar

Jagan Reddy reddyonrails

View GitHub Profile
OK, Let's begin. Hello, Everybody.
My name is Narihiro Nakamura.
Today, I'm talking about "Parallel worlds of CRuby's GC".
I'm very happy now, because I'm meeting attendee in rubyconf.
And, one of my dreams is to talk in rubyconf.
So, I'm very happy and exciting.
Today is my first presentation in English.
My English is not good.
# First the end result of what we want:
class Foo
before_hook :whoa
before_hook :amazing
def test
puts "This is kinda cool!"
end
@reddyonrails
reddyonrails / gist:5421632
Created April 19, 2013 16:54
Class Attribute Mixin to list out attributes and its values as hash when included in Class
module ClassAttributeMixin
def self.included(base)
class << base
def attr_accessor(*splash)
@attributes ||= []
@attributes.concat splash
super
end
@reddyonrails
reddyonrails / translator.rb
Created August 31, 2012 22:17 — forked from vraravam/translator.rb
Use Google translate to translate a yml file from one language to generate a new one for a different language
#!/usr/bin/env ruby
if ARGV.size != 2
puts "Usage: #{$0} <from_language> <to_language>"
exit -1
end
require 'rubygems'
require 'ya2yaml' # this gem is needed for this to work!
require 'yaml'