Rails 7.2 defaults:
Highscore.connection
# => #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x000000000080e8 env_name="development" role=:writing>
With config.active_record.permanent_connection_checkout = :disallowed
:
require 'omniauth-oauth2' | |
require 'openssl' | |
require 'jwt' | |
require 'securerandom' | |
module OmniAuth | |
module Strategies | |
class Bluesky < OmniAuth::Strategies::OAuth2 | |
option :name, 'bluesky' | |
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に関する作業の一覧はここで確認できる。
words = [] | |
letters = ("a".."z").to_a | |
File.foreach("/usr/share/dict/words", chomp: true) do |word| | |
words << word.downcase if word.match?(/\A[a-z]{5}\z/i) | |
end | |
while words.length > 1 | |
weights = letters.to_h { |letter| [letter, 0] } | |
words.each do |word| |
yjit についてメモ書き
めちゃ速い
$ for opt in '' '--jit' '--yjit'; do echo "opt": $opt; time ./miniruby $opt -e 'def fib(n); return n if n < 2; fib(n - 1) + fib(n-2); end; fib(35)'; done
opt:
DidYouMean::SPELL_CHECKERS.merge
deprecate warnings anymore.database.yml
with aliases and secrets.yml
with aliases.If you're trying to install the postgresql gem pg
and it is failing with the following error message:
Installing pg 1.2.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: ~/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/pg-1.2.3/ext
~/.rbenv/versions/3.0.0/bin/ruby -I ~/.rbenv/versions/3.0.0/lib/ruby/3.0.0 -r ./siteconf20210125-97201-pycpo.rb extconf.rb
参考リンク: C MAGAZINE バックナンバー一覧 (本来のサイトはなくなってしまっているためアーカイブページ)