I hereby claim:
- I am unnu on github.
- I am unnu (https://keybase.io/unnu) on keybase.
- I have a public key whose fingerprint is D83B 6A5E 898D 47B8 CEB0 EEB9 C418 0309 9657 1BDA
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
module Paperclip::Storage::Redis | |
def self.extended(base) | |
base.instance_eval do | |
@options[:path] = ":class/:attachment/:id_partition/:style/:filename" | |
@options[:url] = "/dynamic/:class/:attachment/:id_partition/:style/:filename" | |
@redis = Redis.new | |
end | |
end |
class A | |
def foo | |
1 | |
end | |
def beware_1 | |
puts "beware_1" | |
p foo # -> 1 | |
foo = foo |
$ irb | |
ruby-1.9.3-p0 :001 > def foo | |
ruby-1.9.3-p0 :002?> 1 | |
ruby-1.9.3-p0 :003?> end | |
=> nil | |
ruby-1.9.3-p0 :004 > foo | |
=> 1 | |
ruby-1.9.3-p0 :005 > if false | |
ruby-1.9.3-p0 :006?> foo = 2 | |
ruby-1.9.3-p0 :007?> end |
class A | |
def self.hello | |
p 'hello' | |
end | |
def class | |
(class << self; self; end) | |
end | |
end |
require 'rubygems' | |
require 'eventmachine' | |
require 'fiber' | |
class TcpReceiver < EM::Connection | |
attr_accessor :blocker | |
def initialize(receiver) | |
@receiver = receiver | |
super |
require 'java' | |
# setup executor | |
java_import 'java.util.concurrent.ThreadPoolExecutor' | |
java_import 'java.util.concurrent.TimeUnit' | |
java_import 'java.util.concurrent.LinkedBlockingQueue' | |
java_import 'java.util.concurrent.FutureTask' | |
java_import 'java.util.concurrent.Callable' | |
core_pool_size = 5 |
if Rails.env.development? | |
GROWL = Growl.new("127.0.0.1", "ruby-growl", ["ruby-growl Notification"]) | |
GROWL.class_eval do | |
def log(object) | |
GROWL.notify "ruby-growl Notification", "AskWhat Debug", object.inspect | |
Rails.logger.debug { object.inspect } | |
end | |
end | |
end |
File Pattern: | |
!\.(log)|\.(sp?)|(/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ | |
Folder Pattern: | |
!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|db/data.*|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$ |
require 'stringio' | |
class Progress | |
def initialize(show) | |
@device = StringIO.new unless show | |
end | |
def device | |
@device ||= $stdout |