- イレギュラーな単数形に対応するための変更 activesupport/lib/active_support/inflector/inflections.rb
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
| git reset --hard 自分がコミットを追加する前のコミットのhash | |
| git merge ORIG_HEAD --no-ff -m "Merge branch '適当なトピックブランチ名'" |
module ApplicationHelper
def date_select_ja(object_name, method, options = {}, html_options = {})
t = date_select(object_name, method, options, html_options)
t.gsub(/>([12]\d\d\d)</) do |m|
year = m.match(/>(\d\d\d\d)</)[1].to_i
wareki = case year
when 0..1911 # 明治
"明治#{year - 1867}"cd $HOME
mkdir -p lib/
wget http://cx4a.org/pub/rsense/rsense-0.3.zip
unzip rsense-0.3.zip
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 | |
| echo "========Check old type hash statement=========" | |
| git diff --cached | grep ":[^ ]* *=> *:[^ ]*" | |
| result=$? | |
| ret=0 | |
| if [ $result -eq 0 ]; then | |
| echo "!!!!!!!!Include old type hash statement!!!!!!!" | |
| ret=1 | |
| fi |
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
| - 16.times do |r| | |
| - 16.times do |g| | |
| - 16.times do |b| | |
| - if (r + 1) % 4 == 0 && (g + 1) % 4 == 0 && (b + 1) % 4 == 0 | |
| %span{:style => "background-color:##{'%01x'%r + '%01x'%g + '%01x'%b}"} | |
| hoge | |
| - k = 0 | |
| - (0..15).each do |r| |
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
| ws.add_data_validation("C12", { :type => :list, :formula1 => 'A1:A2', :showDropDown => true}) |
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
| require 'mandrill' | |
| m = Mandrill::API.new | |
| message = { | |
| :subject=> "Hello from the Mandrill API", | |
| :from_name=> "Your name", | |
| :text=>"Hi message, how are you?", | |
| :to=>[ | |
| { | |
| :email=> "fukajun.shark@gmail.com", | |
| :name=> "fukajun Test user" |
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
| -- 接続ホスト接続数 接続時間 | |
| select left(host, 20) host_prefix, command, count(*), max(time)/3600 from INFORMATION_SCHEMA.PROCESSLIST group by host_prefix, command order by host_prefix; |