This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'net/http' | |
| require 'string-irc' | |
| channels = %w( #test ) | |
| status_file = '/tmp/.ghe-overload' | |
| pcpu_threshold = 80 |
This file contains hidden or 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
| function! s:dash(...) | |
| let word = len(a:000) == 0 ? input('Dash search: ') : a:1 | |
| call system(printf("open dash://'%s'", word)) | |
| endfunction | |
| command! -nargs=? Dash call <SID>dash(<f-args>) |
This file contains hidden or 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
| # This Rack middleware helps solving the issue with some Rails versions which do not accept | |
| # a '*/*;q=0.6' and their variants 'Accept' request header. This header is particularly used | |
| # by Google Bot, and if Rails doesn't like it, it will return a 500 or 406 error to Google Bot, | |
| # which is not the best way to get your pages indexed. | |
| # | |
| # References: | |
| # - http://stackoverflow.com/questions/8881756/googlebot-receiving-missing-template-error-for-an-existing-template | |
| # - https://github.com/rails/rails/issues/4127 | |
| # | |
| class GoogleBotAware |
This file contains hidden or 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
| #compdef tmuxinator mux | |
| # zsh completion for tmuxinator | |
| # Install: | |
| # $ mkdir -p ~/.tmuxinator/completion | |
| # $ cp _tmuxinator ~/.tmuxinator/completion | |
| # $ vi ~/.zshrc # add the following codes | |
| # fpath=($HOME/.tmuxinator/completion ${fpath}) | |
| # autoload -U compinit |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require 'pathname' | |
| pattern = ARGV.shift | |
| dir = ARGV.shift || Dir.pwd | |
| Pathname(dir).expand_path.ascend{|d| puts Dir.glob(d + pattern)} |
This file contains hidden or 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
| #!/bin/sh | |
| # 'capybara-webkit' の依存性のため、qt をインストールする必要がある | |
| # $ brew install qt | |
| # railsプロジェクト作成して移動する | |
| rails new "$1" --skip-test-unit --database=mysql | |
| cd "$1" | |
| # Gemfileに必要なgemを追記する | |
| cat << HERE >> Gemfile |
This file contains hidden or 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
| #ぼくが考えた最強のれいるずてんぷれーと! | |
| # Copy database.yml | |
| run "cp config/database.yml config/database.sample.yml" | |
| # Delete unnecessary files | |
| run "rm README" | |
| run "rm public/index.html" | |
| #git | |
| git :init |
NewerOlder