Резюме переехало сюда: http://releu.github.com/resume
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
testjknkjn |
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: thin | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: thin initscript | |
# Description: thin | |
### END INIT INFO |
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
ru: | |
ui: | |
notice: | |
friends_count: "Вас добавло в друзья %{count} человек" | |
I18n.t("ui.notice.friends_count", :count => 3) | |
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
class Epay::BankXMLCatcher | |
BANK = 'bank' | |
include XML::SaxParser::Callbacks | |
attr_reader :bank_xml | |
def initialize | |
@bank_xml = "" | |
@in_bank = false |
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
class Array | |
def sum | |
inject(0) { |s, i| s + i } | |
end | |
end | |
array = [1, 2] | |
while array.last < 4000000 | |
array << array[-2, 2].sum | |
end |
tratata
def foo
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
module Models | |
module Likable | |
extend ActiveSupport::Concern | |
def liked?(record) | |
$redis.sismember redis_key, record.id | |
end | |
def likes_count | |
$redis.scard redis_key |
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
process = Fiber.new do | |
i = 0 | |
loop do | |
puts "process_#{i = i.next}" | |
sleep 0.1 | |
Fiber.yield | |
end | |
end | |
loop do |
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
>> a | |
=> "Something like this\n\n<div class=\"gistable\" data-gist-at=\"1988392\"></div>\n\n#ruby #fiber" | |
>> a.split(' ') | |
=> ["Something", "like", "this", "<div", "class=\"gistable\"", "data-gist-at=\"1988392\"></div>", "#ruby", "#fiber"] | |
>> a.split(/ /) | |
=> ["Something", "like", "this\n\n<div", "class=\"gistable\"", "data-gist-at=\"1988392\"></div>\n\n#ruby", "#fiber"] |
OlderNewer