Skip to content

Instantly share code, notes, and snippets.

View willnet's full-sized avatar
🏠
Working from home

Shinichi Maeshima willnet

🏠
Working from home
View GitHub Profile
@metaskills
metaskills / wait_until.rb
Last active June 7, 2026 14:27
Never sleep() using Capybara!
# WAIT! Do consider that `wait` may not be needed. This article describes
# that reasoning. Please read it and make informed decisions.
# https://www.varvet.com/blog/why-wait_until-was-removed-from-capybara/
# Have you ever had to sleep() in Capybara-WebKit to wait for AJAX and/or CSS animations?
describe 'Modal' do
should 'display login errors' do
visit root_path
@hayajo
hayajo / changelog_en.md
Last active March 18, 2026 16:53
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@trcarden
trcarden / gist:3295935
Created August 8, 2012 15:28
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@jrom
jrom / nginx.conf
Created February 7, 2012 17:14
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@defunkt
defunkt / connection_fix.rb
Created November 19, 2009 20:00
MySQL server has gone away fix
# If your workers are inactive for a long period of time, they'll lose
# their MySQL connection.
#
# This hack ensures we re-connect whenever a connection is
# lost. Because, really. why not?
#
# Stick this in RAILS_ROOT/config/initializers/connection_fix.rb (or somewhere similar)
#
# From:
# http://coderrr.wordpress.com/2009/01/08/activerecord-threading-issues-and-resolutions/
@taichi
taichi / code_review_basics.md
Last active November 17, 2025 18:46
チームでコードを書き始めた後、「どうやらレビューってやつをした方が良いらしい」くらいの若手に向けた資料です。

コードレビューの基本


一番大事な事

ソースコードはプロジェクトの共同所有物である

  • 誰かだけが触れるコードを無くす
@joker1007
joker1007 / ginzarb_21.md
Last active September 5, 2025 05:31
Ginza.rb 21回の発表資料。rails_adminのつらみとオススメgem達。

rails_adminのつらみとオススメGemについて

rails_adminのつらみ

カスタマイズできるようで出来ない

レコード件数が一定以上になると使えない機能

  • ダッシュボード
  • 何も考えずに各モデルをカウントするのでレコード件数増えるとえらいことになる。

2024-03 下の子が2歳になった

この文章の概要

  • 下の子が2歳になったので、この1年を思い出した結果を書き残しておいたもの
  • 将来読み返したら面白いかもなぁ、という意図で、オチはない
  • 過去記事一覧→誕生日記事早見表

3行まとめ

  • 特に問題もなく順調に2歳になってよかった。早いものである
  • 上の子に比べて育てやすさがある。会話ができるまではまだあと1年ぐらい必要
@monochromegane
monochromegane / 速習Go.md
Created July 4, 2014 09:16
速習Go。Fukuoka.go#1用の資料です。

速習Go

Go環境のつくりかた

MacOSX

homebrewでインストール

$ brew update
@voluntas
voluntas / mini4w.rst
Last active August 29, 2023 20:46
ミニ四駆走らせたいに参加してきた

ミニ四駆走らせたいに参加してきた

主催:@kamekoopa
日時:2014-06-07 13:00 - 19:00
場所:pixiv
コース:pixiv

概要