- Remote Code Executionとして、Advisoryが更新された。
- https://groups.google.com/d/msg/rubyonrails-security/zRNVOUhKHrg/GmmcVXcmAAAJ
- Thanks to @sorah @tenderlove
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/ips' | |
Benchmark.ips do |x| | |
x.report("2..50") { | |
case rand(50) | |
when 1 | |
1 | |
when 2..50 | |
50 | |
else |
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
# example(it)内でローカル変数を宣言する | |
describe 'convert_hash_syntax' do | |
it '=>が:に置き換わる' do | |
old_syntax = <<~TEXT | |
{ | |
:name => 'Alice', | |
:age => 20, | |
:gender => :female | |
} | |
TEXT |
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 Ruler | |
def initialize(default_length = 30) | |
@length = default_length | |
@delfaut_length = default_length | |
end | |
def reset_length_to_default | |
@length = @default_length | |
end | |
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
// Amazonの注文履歴をTSV形式で出力するスクリプト | |
// | |
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。 | |
// formatEntry関数を書き換えれば自由な書式で出力できます。 | |
// | |
// 参考: | |
// - Amazonの注文履歴をCSV形式にして出力するスクリプト | |
// https://gist.github.com/arcatdmz/8500521 | |
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン) | |
// https://gist.github.com/polamjag/866a8af775c44b3c1a6d |
NewerOlder