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 'date' | |
data = File.read("CHANGELOG.md") | |
versions = [] | |
data.scan(/## Solidus ([0-9\.]+)\.0 \(([0-9]+)-([0-9]+)-([0-9]+)\)/) do | |
version = $1 | |
release_date = Date.new($2.to_i, $3.to_i, $4.to_i) | |
eol = [release_date >> 18, Date.new(2018, 05, 05)].max |
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 I18nLogger | |
include I18n::Backend::Base | |
include I18n::Backend::Flatten | |
def available_locales | |
['en'] | |
end | |
def lookup(locale, key, scope = [], options = {}) | |
p [locale, key, {scope: scope, options: options}] |
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
$ ruby -v | |
ruby 2.6.0dev (2018-02-05 trunk 62211) [x86_64-linux] | |
$ time =ruby --disable-gems 15b.rb | |
313 | |
=ruby --disable-gems 15b.rb 8.99s user 0.00s system 99% cpu 9.011 total | |
$ time =ruby --disable-gems --jit 15b.rb | |
313 | |
=ruby --disable-gems --jit 15b.rb 7.37s user 0.04s system 105% cpu 6.991 total |
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
$ time ruby --disable-gems -e '' | |
0.006 total | |
$ time ruby -e '' | |
0.036 total | |
$ time ruby --disable-gems --jit -e '' | |
0.184 total | |
$ time =ruby --jit -e '' |
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
$ ruby -v | |
truffleruby 0.30.2, like ruby 2.3.5 <Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 with Graal> [linux-x86_64] | |
$ time =ruby -e '' | |
=ruby -e '' 16.52s user 0.37s system 350% cpu 4.821 total | |
$ time =ruby --native -e '' | |
=ruby --native -e '' 0.12s user 0.03s system 98% cpu 0.159 total | |
$ time =ruby 15a.rb |
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 stable ping target | |
# pretty much anything is more reliable than shaw | |
target_ip = "1.1.1.1" | |
# Maximum wait time in seconds. | |
wait = 1 | |
interval = 10 | |
require 'fileutils' |
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
$ ruby report.rb | |
Outage from 2018-06-07 02:50:49 -0700 to 2018-06-07 02:58:32 -0700 | |
duration: 8 minutes | |
pings lost: 77% (34 / 44) | |
average ping: 22ms | |
Outage from 2018-06-07 05:07:10 -0700 to 2018-06-07 05:21:04 -0700 | |
duration: 14 minutes | |
pings lost: 83% (65 / 78) | |
average ping: 16ms |
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
source 'https://rubygems.org' | |
gem 'rails', '~> 5.0.0' | |
# Soft-deletion | |
gem 'paper_trail' | |
gem 'discard', '~> 1.0' | |
# auth | |
gem 'pundit' |
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
getattrlist("app\0", 0x7FFEEE3598D0, 0x7FFEEE359910) = 0 0 | |
getattrlist("app/views\0", 0x7FFEEE3596F0, 0x7FFEEE359730) = 0 0 | |
getattrlist("app/views/users\0", 0x7FFEEE359510, 0x7FFEEE359550) = 0 0 | |
getattrlist("app/views/users/show.en.html.raw\0", 0x7FFEEE359330, 0x7FFEEE359370) = -1 Err#2 | |
getattrlist("app\0", 0x7FFEEE3598D0, 0x7FFEEE359910) = 0 0 | |
getattrlist("app/views\0", 0x7FFEEE3596F0, 0x7FFEEE359730) = 0 0 | |
getattrlist("app/views/users\0", 0x7FFEEE359510, 0x7FFEEE359550) = 0 0 | |
getattrlist("app/views/users/show.en.html.erb\0", 0x7FFEEE359330, 0x7FFEEE359370) = -1 Err#2 | |
getattrlist("app\0", 0x7FFEEE3598D0, 0x7FFEEE359910) = 0 0 | |
getattrlist("app/views\0", 0x7FFEEE3596F0, 0x7FFEEE359730) = 0 0 |
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
getattrlist("app\0", 0x7FFEEC328C50, 0x7FFEEC328C90) = 0 0 | |
getattrlist("app/views\0", 0x7FFEEC328A70, 0x7FFEEC328AB0) = 0 0 | |
getattrlist("app/views/users\0", 0x7FFEEC328890, 0x7FFEEC3288D0) = 0 0 | |
sigprocmask(0x1, 0x0, 0x7FFEEC3292A0) = 0x0 0 | |
sigaltstack(0x0, 0x7FFEEC329290, 0x0) = 0 0 | |
openat(0xFFFFFFFFFFFFFFFE, "app/views/users\0", 0x1100000, 0x1) = 7 0 | |
fstat64(0x7, 0x7FFEEC329220, 0x0) = 0 0 | |
fcntl_nocancel(0x7, 0x2, 0x1) = 0 0 | |
fstatfs64(0x7, 0x7FFEEC328968, 0x0) = 0 0 | |
getdirentries64(0x7, 0x7FA162008000, 0x1000) = 104 0 |