Skip to content

Instantly share code, notes, and snippets.

class Zyd
def wlosy=(hair)
@hair = hair
end
def pazernosc=(greed)
@greed = greed
end
def wlosy
@ml
ml / rabinator
Created June 27, 2012 10:52 — forked from anonymous/rabinator
class Zyd
def wlosy(hair)
@hair = hair
end
def pazernosc(greed)
@greed = greed
end
@ml
ml / Paździeż
Created April 14, 2012 09:36 — forked from anonymous/Paździeż
def prompt
print ">> "
end
puts "Od ilu zaczynamy?"
prompt
i = STDIN.gets()
puts "i.class => #{i.class}"
numbers = []
1 Strace:
Slow run:
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
64.17 0.011159 0 501163 488683 stat
26.09 0.004538 0 22257 sendto
2.29 0.000398 0 13104 109 open
@ml
ml / gist:599642
Created September 27, 2010 19:24
Gitifier.app/Contents/MacOS/Gitifier
dyld: Library not loaded: /usr/lib/libcrypto.0.9.8.dylib
Referenced from: /Users/lotus/Downloads/Gitifier.app/Contents/MacOS/Gitifier
Reason: image not found
Trace/BPT trap
$ sudo /etc/init.d/redis start
mlotkowski@blip-redis-1c:/var/redis/blip/current$ ./redis-cli info | grep used_memory
used_memory:1549176
used_memory_human:1.48M
mlotkowski@blip-redis-1c:/var/redis/blip/current$ grep Vm /proc/`cat /var/run/redis.pid`/status
VmPeak: 10560 kB
VmSize: 10432 kB
VmLck: 0 kB
VmHWM: 2240 kB
VmRSS: 2236 kB
$ racksh 14:17
Rack::Shell v0.9.7 started in development environment.
irb(main):001:0> /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/racksh-0.9.7/bin/racksh:22:in `wait': Interrupt
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/racksh-0.9.7/bin/racksh:22
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/racksh-0.9.7/bin/racksh:16:in `loop'
from /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/racksh-0.9.7/bin/racksh:16
from /opt/ruby-enterprise/bin/racksh:19:in `load'
from /opt/ruby-enterprise/bin/racksh:19
Warning: You should upgrade to Xcode 3.1.4
==> Build Environment
PATH: /Users/lotus/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin
CFLAGS: -O3 -march=nocona -mfpmath=sse -w -pipe
MAKEFLAGS: -j2
CC: /usr/bin/cc
CXX: /usr/bin/c++
==> Downloading http://google-perftools.googlecode.com/files/google-perftools-1.4.tar.gz
File already downloaded and cached to /Library/Caches/Homebrew
/usr/bin/tar xf /Library/Caches/Homebrew/google-perftools-1.4.tar.gz
Warning: You should upgrade to Xcode 3.1.4
==> Build Environment
PATH: /Users/lotus/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/usr/X11/bin
CFLAGS: -O3 -march=nocona -mfpmath=sse -w -pipe
MAKEFLAGS: -j2
CC: /usr/bin/cc
CXX: /usr/bin/c++
==> Downloading http://google-perftools.googlecode.com/files/google-perftools-1.4.tar.gz
File already downloaded and cached to /Library/Caches/Homebrew
/usr/bin/tar xf /Library/Caches/Homebrew/google-perftools-1.4.tar.gz
DataMapper.setup(:default, :adapter => 'mysql', :database => "test", :username => "root")
DataMapper.setup(:dual, :adapter => "dual", :default => repository(:default), :redis => {:db => 1})
class DualAdapter < AbstractAdapter
def create(query)
@default.create query
end
def read(query)
query = simplify(query) if simplify_applies?(query)