Skip to content

Instantly share code, notes, and snippets.

View yasulab's full-sized avatar
💎
\\ Rubyist! //

Yohei Yasukawa yasulab

💎
\\ Rubyist! //
View GitHub Profile
@peterc
peterc / CONVENTIONS.md
Last active April 5, 2025 17:55
CONVENTIONS.md file for AI Rails 8 development
  • You MUST NOT try and generate a Rails app from scratch on your own by generating each file. For a NEW app you MUST use rails new first to generate all of the boilerplate files necessary.
  • Create an app in the current directory with rails new .
  • Use Tailwind CSS for styling. Use --css tailwind as an option on the rails new call to do this automatically.
  • Use Ruby 3.2+ and Rails 8.0+ practices.
  • Use the default Minitest approach for testing, do not use RSpec.
  • Default to using SQLite in development. rails new will do this automatically but take care if you write any custom SQL that it is SQLite compatible.
  • An app can be built with a devcontainer such as rails new myapp --devcontainer but only do this if requested directly.
  • Rails apps have a lot of directories to consider, such as app, config, db, etc.
  • Adhere to MVC conventions: singular model names (e.g., Product) map to plural tables (products); controllers are plural.
  • Guard against incapable browsers accessing controllers with `allo
@blu3mo
blu3mo / gist:1aa5cc22bd893d2e8dd00a485853d014
Last active April 17, 2025 08:47
未踏ジュニア採択に向けた徹底調査レポート

(下にスクロールして本文へ)

  • 読者に価値のある情報だと思うので共有: 今年は未踏ジュニアに事前応募するとプロトタイプ開発にChatGPT APIが無料で使えます。

  • 以下本文


了解しました!未踏ジュニアに『採択されるために役立つ』実践的な知見を重点的に調査します。

@yahonda
yahonda / gist:7f5ee2861ecce0cdfcb422ef8735838a
Last active February 1, 2024 02:52
Rails CI using Ruby master branch

RailsのRuby masterブランチでのCIについて複数回聞かれたのでメモしておきます。

Rails 7.2で予定される変化

Rails CIとRubyバージョン

@pocke
pocke / videos.csv
Created June 22, 2023 04:01
RubyKaigi 2023 video list CSV
title link
[JA] The future vision of Ruby Parser / Yuichiro Kaneko @spikeolaf https://www.youtube.com/watch?v=IhfDsLx784g&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=2&pp=iAQB
[EN] RuboCop's baddest cop / Genadi Samokovarov @gsamokovarov https://www.youtube.com/watch?v=n-D9uPOo_kc&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=3&pp=iAQB
[EN] Generating RBIs for dynamic mixins with Sorbet and Tapioca / Emily Samp @egiurleo https://www.youtube.com/watch?v=UpbVZ4Gqk3c&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=4&pp=iAQB
[JA] Make Regexp#match much faster / Hiroya FUJINAMI @makenowjust https://www.youtube.com/watch?v=IbMFHxeqpN4&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=5&pp=iAQB
[EN] Understanding the Ruby Global VM Lock by observing it / Ivo Anjo @KnuX https://www.youtube.com/watch?v=rI4XlFvMNEw&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&index=6&pp=iAQB
[JA] develop chrome extension with ruby.wasm / Yuma Sawai @aaaa777 https://www.youtube.com/watch?v=A2ziP8V9muE&list=PLbFmgWm555yYvWS7VGTFipF7ckduvSeT-&inde
@yahonda
yahonda / polished_ruby.md
Last active April 17, 2023 07:26
『研鑽Rubyプログラミング』感想

目的

この記事は、『研鑽Rubyプログラミング ― 実践的なコードのための原則とトレードオフ』 の感想記事です。レビューアーとして参加し、本書が広く読まれて欲しいので宣伝のために書きました。本記事は、"研鑽Rubyプログラミング β版 final"をもとに実施してます。なお、私自身はレビュアー参加のお礼として一冊本書をいただくことになっています。

きっかけ

私は2019年のRubyKaigiで、著者のJeremy EvansのKeynoteのレポート Jeremy Evansさん「たのしいRubyの先に、はやいRubyがある。Work, Correct, Fun! Fast」 〜RubyKaigi 2019 3日目 基調講演 を書いたことや、ある程度Ruby on Railsやデータベースに関するバックグラウンドがあったことから、その後翻訳者の角谷さんのレビューアー募集に応募して選ばれたというのがきっかけです。

@insin
insin / undoge.css
Created April 4, 2023 01:50
Replace doge with the Twitter logo
svg pattern + path[fill] {
fill: inherit;
d: path("M23.643 4.937c-.835.37-1.732.62-2.675.733.962-.576 1.7-1.49 2.048-2.578-.9.534-1.897.922-2.958 1.13-.85-.904-2.06-1.47-3.4-1.47-2.572 0-4.658 2.086-4.658 4.66 0 .364.042.718.12 1.06-3.873-.195-7.304-2.05-9.602-4.868-.4.69-.63 1.49-.63 2.342 0 1.616.823 3.043 2.072 3.878-.764-.025-1.482-.234-2.11-.583v.06c0 2.257 1.605 4.14 3.737 4.568-.392.106-.803.162-1.227.162-.3 0-.593-.028-.877-.082.593 1.85 2.313 3.198 4.352 3.234-1.595 1.25-3.604 1.995-5.786 1.995-.376 0-.747-.022-1.112-.065 2.062 1.323 4.51 2.093 7.14 2.093 8.57 0 13.255-7.098 13.255-13.254 0-.2-.005-.402-.014-.602.91-.658 1.7-1.477 2.323-2.41z");
}
@yahonda
yahonda / ruby31onrails.md
Last active April 15, 2025 20:01
Ruby 3.1 on Rails

Ruby 3.1 on Rails

Actions required to use Ruby 3.1.0 with Rails

Rails 7.0.Z

  • Rails 7.0.1 is compatible with Ruby 3.1.0.
  • Rails 7.0.1 addes net-smtp, net-imap and net-pop gems as Action Mailbox and Action Mailer dependency, you do not need to add them explicitly in your application Gemfile anymore.
  • thor 1.2.1 has been released. You will not see DidYouMean::SPELL_CHECKERS.merge deprecate warnings anymore.

Rails 6.1.Z

  • Use Rails 6.1.5 to support database.yml with aliases and secrets.yml with aliases.
@philip-gai
philip-gai / gh-set-secret.yml
Last active January 14, 2024 18:11
GitHub Actions: Set a repo environment secret using the gh cli in 1-2 steps
# Prerequisites:
# - Create a secret with your PAT token. Permissions needed: repo (all) and read:org
# - Create the HELLO_WORLD secret in your environment with some dummy initial value
#
# Notes:
# - You can tell that it works because it masks the secret_body in the echo secret step after it creates the secret 😄
# - If you don't want to have to pass --repo to gh secret set, then put the actions/checkout@v2 step before the gh secret set step
name: gh-set-secret
@kakutani
kakutani / reading-polished-ruby-translation.md
Last active November 3, 2021 14:06
Polished Ruby Programming翻訳査読書(のようなもの)

"Polished Ruby Programming" by Jeremy Evans

-- Build better software with more intuitive, maintainable, scalable, and high-performance Ruby code

「Rubyの磨きかた -- わかりやすくてメンテナンスしやすい、スケール可能で高性能なRubyコードでソフトウェアを上手につくろう」みたいな感じ?

https://www.packtpub.com/product/polished-ruby-programming/9781801072724

  • Publication date: June 2021
  • Publisher: Packt
  • Pages: 381
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers