Skip to content

Instantly share code, notes, and snippets.

View bluerabbit's full-sized avatar
🤠
spark joy

Akira Kusumoto bluerabbit

🤠
spark joy
View GitHub Profile
# Monkeypatch to disable connection pooling in ActiveRecord
module ActiveRecord
module ConnectionAdapters
class ConnectionPool
def checkout
c = ActiveRecord::Base.send(spec.adapter_method, spec.config.dup)
c.verify!
c
end
@metaskills
metaskills / wait_until.rb
Last active May 2, 2024 01:51
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
@lucianot
lucianot / googlespreadsheet.rb
Created February 23, 2012 18:12
Read from Google Spreadsheet
require "rubygems"
require "google_spreadsheet"
require "launchy"
require "json"
CLIENT_ID = ""
CLIENT_SECRET = ""
SPREADSHEET_URL = ""
$user_token = nil
@riywo
riywo / make-rpm.sh
Created March 15, 2012 15:28
fluent-agent-liteのrpm作るだけのshell
#!/bin/sh
if [ -z "$1" ]; then
echo "usage: ./make-rpm.sh 0.2"
exit 1
fi
version=$1
cur=`pwd`
rm -f fluent-agent-lite.v$version.tar.gz
rm -fr fluent-agent-lite
@yuroyoro
yuroyoro / pre-commit.keyword-check.sample
Created March 16, 2012 04:27
特定のキーワードが含まれたらcommitさせないgit-hook
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@peterkappus
peterkappus / capirb.txt
Last active January 10, 2021 11:52
Quick start for using Capybara in IRB with Chromedriver
# copy and paste this into your terminal to start an IRB session and use Capybara's DSL to write tests interactively
# Thanks to Tom Clements
# http://tom-clements.com/blog/2012/02/25/capybara-on-the-command-line-live-browser-testing-from-irb/
# I prefer using chrome...
# First you need to install the chromedriver https://sites.google.com/a/chromium.org/chromedriver/downloads
# Unzip, and move the executable somewhere in your path...
# e.g.
mv ~/Downloads/chromedriver /usr/local/bin
@rosylilly
rosylilly / gist:3401612
Created August 20, 2012 06:40
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@hanachin
hanachin / README.md
Created November 4, 2012 17:48
Sublime Text 2 Plugin AutomaticClosePurchaseDialog (works only osx)

How to use

git clone git://gist.github.com/4012751.git ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/AutomaticClosePurchaseDialog

@gaspanik
gaspanik / st2pkgs-for-webdev.markdown
Last active January 18, 2021 09:05
ST2: Sublime Text 2 Packages for Web Developers.

Recommended Sublime Text 2 Packages for Web Developers.

Update

  • 「Browser Support」を追加しました。

2013 Spring & Summer

こもりが使っているモノやそうでないものも含め、なんとなくWebデザイナーやWebデベロッパーな人たちに便利そうなのを集めてみました。