Skip to content

Instantly share code, notes, and snippets.

View is8r's full-sized avatar
🙂

Yu Ishihara is8r

🙂
View GitHub Profile
@is8r
is8r / gist:5523119
Created May 6, 2013 02:54
クラスの書き方
class Thumb
base: null
ready: false
constructor: (@base) ->
base = @base
$(base).animate(opacity:0)
enter: (d) ->
$(base).delay(d).animate(opacity:1)
@is8r
is8r / new_gist_file
Last active December 17, 2015 03:39
パーシャルの使い方
= render partial: 'xxx', locals: { xxxx: @xxxx }
@is8r
is8r / new_gist_file
Created May 9, 2013 02:19
dbを一旦削除して作りなおしてmasterと同期する
bundle exec rake db:drop && bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rake db:setup && bundle exec rake master
@is8r
is8r / gist:5546207
Created May 9, 2013 08:13
最新からn個前のコミットをまとめる
git rebase -i HEAD~n
@is8r
is8r / new_gist_file
Created May 9, 2013 08:22
ローカルのmasterブランチを最新にする
git co master && git pull origin master
(なんか変な時は)git pull -u origin master
@is8r
is8r / gist:5583173
Created May 15, 2013 10:57
sassでデバッグ用の出力をする
$color: #ff0000 - 100
@debug @{$color}100引いた後の色。
@is8r
is8r / gist:5588928
Last active December 17, 2015 09:39
特定の要素が無い場合はreturn
$ ->
return if $("#xxx").length == 0
@is8r
is8r / gist:5598075
Created May 17, 2013 09:44
オブジェクトの中身を列挙する
debug(@data)
@is8r
is8r / gist:5604365
Created May 18, 2013 13:11
吹き出しなどに使う3角形を作るcss
=tri($c: #222, $w:1 0px, $t: 10px, $l: 10px)
&:after
content: ""
position: absolute
width: 0
height: 0
border: $w solid transparent
border-top-color: $c
top: $t
margin-left: -$w/2
@is8r
is8r / gist:5610739
Created May 20, 2013 06:40
カラムの名前を取得する
Xxx.column_names