- トイレットペーパーホルダーが二つあるトイレでは、紙が少ないほうを先に使いましょう
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
(Date.parse('2012-01-01')..Date.parse('2012-01-31')).to_a.find_all { |d| | |
not d.sunday? and not d.saturday? | |
}.map { |d| | |
d.day | |
} |
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
#!/usr/bin/env ruby | |
cols = (ARGV[0] || 5).to_i - 1 | |
rows = (ARGV[1] || 9).to_i | |
begin | |
table = (0...rows).map do |i| | |
(0...cols).map { rand(2) }.join | |
end | |
end until table.join =~ /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
require 'rack/utils' | |
require 'rack/protection/path_traversal' | |
module Rack | |
module Utils | |
orig_normalize_params_singleton = method(:normalize_params) | |
define_singleton_method(:normalize_params) do |params, name, *args| | |
return unless name && name.valid_encoding? | |
orig_normalize_params_singleton.call(params, name, *args) | |
end |
https://zverok.space/blog/2022-03-03-WAR.html 翻訳
2022年3月3日
やぁ、僕はVictor Shepelev。ウクライナのハリコフに住んでいて、TwitterやGitHubでは@zverokというIDで活動している。
僕がRubyを書き始めたのは2003年からで、いくつかのライブラリやRuby Changelogのメンテナだ。国際的なカンファレンスや/r/rubyなんかで君たちと会ったことがあるかも知れない。今年、僕はRubyコミッターに申請して、嬉しいことに承認された。僕が取り組んでいるのは(いくつかの小さな機能追加と共に)Rubyドキュメントの改善だ。僕のRubyに関する作業の一覧はここで確認できる。
社会人のための趣味CTFまとめ http://hority-ctf.blogspot.jp/2014/08/ctf.html
Original: "Callbacks are imperative, promises are functional: Node's biggest missed opportunity" by James Coglan
Translated by Yuta Okamoto (@okapies)
- 訳者は JavaScript や Node.js に関する専門知識がほとんどありません。識者のツッコミをお待ちしております。「◯◯が分からない」等も歓迎です。
- 元記事から構成を一部変更しています。また、関数型プログラミングに関する記述のうち、議論の骨子に絡まないものは省略しています。