Skip to content

Instantly share code, notes, and snippets.

View satour's full-sized avatar
💭
I may be slow to respond.

Satoru Ishikawa satour

💭
I may be slow to respond.
View GitHub Profile
$(function() {
$("a#get_name").one('click', function() {
var yamada_name = $("p#yamada_name").text()
$("span#subject01_result").text(yamada_name)
});
$("a#add_sakurako").one('click', function() {
var sakurako = '<li id="sakurako">櫻子</li>'
$("ul#member_list").append(sakurako)
});
$("a#add_himawari").one('click', function() {
@satour
satour / ratchet_for_rails_scaffold.css.scss
Created July 29, 2014 08:34
ratchet_for_rails_scaffold.css.scss
/*! Ratchet for Rails Scaffold | MIT License | */
/*! Ratchet v2.0.2 | MIT License | github.com/twbs/ratchet/blob/master/LICENSE */
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
html {
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
---
ja:
language: 日本語
# Generic terms.
#----------------------------------------------------------------------------
id: Id
all: すべて
at: at
here: here
@satour
satour / devise.ja.yml
Created October 4, 2014 11:42
Japanese locale file for Devise (3.4.0)
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
ja:
devise:
confirmations:
confirmed: 'アカウントを登録しました。'
send_instructions: 'アカウントの有効化について数分以内にメールでご連絡します。'
send_paranoid_instructions: "あなたのメールアドレスが登録済みの場合、本人確認用のメールが数分以内に送信されます。"
failure:
already_authenticated: 'すでにログインしています。'
@satour
satour / LOWERCASE.rb
Created May 16, 2015 15:25
LOWERCASE - CodeEval
# https://www.codeeval.com/open_challenges/20/
File.open(ARGV[0]).each_line do |line|
puts line.downcase
end
@satour
satour / REVERSE_WORDS.rb
Created May 16, 2015 15:27
REVERSE WORDS - CodeEval
#https://www.codeeval.com/open_challenges/8/
File.open(ARGV[0]).each_line do |line|
puts line.split(" ").reverse.join(" ")
end
@satour
satour / SWAP_NUMBERS.rb
Created May 16, 2015 15:29
SWAP NUMBERS - CodeEval
#https://www.codeeval.com/open_challenges/196/
File.open(ARGV[0]).each_line {|line|
input_line = line.chomp.split(" ")
output_line = []
input_line.each{|word|
swap = word.dup
swap[0] = word[-1]
swap[-1] = word[0]
output_line << swap
}
@satour
satour / COMPARE_POINTS.rb
Last active August 29, 2015 14:21
COMPARE POINTS - CodeEval
#https://www.codeeval.com/open_challenges/192/
File.open(ARGV[0]).each_line do |line|
x, y, q, r = line.split(/ /).map(&:to_i)
operation = ""
operation += "N" if (r-y) > 0
operation += "S" if (r-y) < 0
operation += "E" if (q-x) > 0
operation += "W" if (q-x) < 0
operation = "here" if operation == ""
puts operation
@satour
satour / heroku-connect-config.rb
Created September 28, 2015 12:46
heroku-connect-config json
#argv[0]: path to json file. argv[1]:app_name, argv[2]:organization_id
require "json"
def check_args
unless ARGV[0] && ARGV[1] && ARGV[2]
puts "ARGV[0]: path to json file. ARGV[1]:app_name, ARGV[2]:organization_id"
return
end
create_file
end
@satour
satour / tigrc
Created November 16, 2015 08:22
a dotfile for tig command.
# taken from https://github.com/cbertoldi/dotfiles/blob/80ba11c5cf86e90cf156906a226694b309a6995d/tigrc.symlink
# vim: set expandtab sw=4 tabstop=4:
# *color* 'area' 'fgcolor' 'bgcolor' '[attributes]'
# general
color default 15 235
color cursor 15 241
color title-focus 242 221
color title-blur 242 221
color delimiter 213 default