This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mem = 1024 * 1024 | |
ary = [] | |
i = 0 | |
loop { | |
p i | |
ary << (" " * mem) | |
i += 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modprobe zram | |
echo 512M > /sys/block/zram0/disksize | |
mkswap /dev/zram0 | |
swapon /dev/zram0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mem = 1024 * 1024 | |
ary = [] | |
i = 0 | |
seed = (0..mem).map { rand(255) }.pack("C*") | |
loop { | |
p i | |
x = seed.dup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modprobe zram num_devices=1 | |
totalmem=`free | grep -e "^Mem:" | sed -e 's/^Mem: *//' -e 's/ *.*//'` | |
mem=$(((totalmem / 2) * 1024)) | |
echo $mem > /sys/block/zram0/disksize | |
mkswap /dev/zram0 | |
swapon -p 5 /dev/zram0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl http://tachyon.vektra.io/install.sh > it.sh && test $(openssl sha1 < it.sh) = "23fb0450b152dfaa8331dd37c3a4c13d4de9dbb8" && bash it.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type A interface { | |
Foo() int | |
} | |
type B interface { | |
Foo() int | |
} | |
type D interface { | |
Report(a A) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
require 'benchmark/ips' | |
outer_b = 0 | |
Benchmark.ips do |x| | |
outer_a = 0 | |
x.report "inner a block" do | |
inner_a = 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):003:0> require 'socket' | |
=> true | |
irb(main):004:0> s = TCPServer.new 9999 | |
=> #<TCPServer:fd 10> | |
irb(main):005:0> Thread.new { s.accept } | |
=> #<Thread:0x007fedf33f0e88 run> | |
irb(main):006:0> c = TCPSocket.new "0.0.0.0", 9999 | |
=> #<TCPSocket:fd 11> | |
irb(main):007:0> Process.fork { p $$ } | |
on_fork: Detected open IO at fork: #<TCPServer:0x007fedf33e8f08> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<match path="project"> rubinius </match> | |
<formatter medium="irc"> | |
<lineLimit>1</lineLimit> | |
<wrapWidth>150</wrapWidth> | |
<widthLimit>150</widthLimit> | |
<crunchWhitespace/> | |
<format appliesTo="CommitToIRC"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hoshi :: /var/log> | |
Message from syslogd@hoshi at Fri Aug 1 10:02:17 2008 ... | |
hoshi kernel: [172392.427177] Uhhuh. NMI received for unknown reason 3c on CPU 0. | |
Message from syslogd@hoshi at Fri Aug 1 10:02:17 2008 ... | |
hoshi kernel: [172392.431038] Do you have a strange power saving mode enabled? | |
Message from syslogd@hoshi at Fri Aug 1 10:02:17 2008 ... | |
hoshi kernel: [172392.431038] Dazed and confused, but trying to continue | |