Skip to content

Instantly share code, notes, and snippets.

View simi's full-sized avatar
🇨🇿

Josef Šimánek simi

🇨🇿
View GitHub Profile
source 'http://gemcutter.org'
# Project requirements
gem 'rack-flash'
gem 'thin' # or mongrel
# Component requirements
gem 'haml'
# Test requirements
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
namespace serializeArray
{
class Program
{
class First
def test(arg1, arg2)
p arg1
p arg2
end
end
class Second < First
def test(arg1, arg2)
super(arg1, arg2)
<Fadi> hi
<retro|cz> hi
<Fadi> how r u?
<retro|cz> good
<Fadi> nice nick name
<Fadi> Retro
<retro|cz> Thank you
<retro|cz> Your nickname is nice too.
<Fadi> thanks alot
<Fadi> r u student?
def parent_keys
x = []
if not parent.nil?
x << parent.parent_keys
end
x.flatten + self.key.to_a
end
def nest
a = full_key_array
x = {}; a[0..-2].inject(x) { |h,k| h[k.to_sym] = {} }[a[-1].to_sym] = value;
x
end
test = Hash.new
test.class == Hash #=> true
case test.class.to_s
when "Hash"
true
else
false
end
end #=> true
'ApplicationHelper format_message should translate one new line to a html format' FAILED
expected <p>Maecenas adipiscing scelerisque urna.
<br />Aliquam at diam elit, sit amet eleifend sem.</p>, got "<p>Maecenas adipiscing scelerisque urna.\n<br />Aliquam at diam elit, sit amet eleifend sem.</p>"
@simi
simi / test
Created November 24, 2010 17:13
/dev/vda:
Timing cached reads: 9826 MB in 2.00 seconds = 4919.46 MB/sec
Timing buffered disk reads: 18 MB in 3.13 seconds = 5.75 MB/sec
/dev/vda:
Timing cached reads: 8360 MB in 2.00 seconds = 4184.95 MB/sec
Timing buffered disk reads: 22 MB in 3.41 seconds = 6.45 MB/sec
/dev/vda:
Timing cached reads: 10058 MB in 2.00 seconds = 5036.60 MB/sec
@simi
simi / openttd.cfg
Created November 26, 2010 12:26
retro's night build openttd cfg
[misc]
display_opt = SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|FULL_DETAIL|WAYPOINTS
news_ticker_sound = true
fullscreen = false
graphicsset =
soundsset =
musicset =
videodriver =
musicdriver =