Skip to content

Instantly share code, notes, and snippets.

View is8r's full-sized avatar
🙂

Yu Ishihara is8r

🙂
View GitHub Profile
@is8r
is8r / gist:5499975
Created May 2, 2013 03:26
よく使う日本語ゴシック体のフォント設定
//+font-sans
=font-sans
font-family: 'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ',Meiryo,'MS Pゴシック',sans-serif
@is8r
is8r / gist:5499981
Created May 2, 2013 03:27
よく使う日本語サンセリフ体のフォント設定
//+font-serif
=font-serif
font-family: 'ヒラギノ明朝 Pro W6','Hiragino Mincho Pro','HGS明朝E','MS P明朝',serif
@is8r
is8r / gist:5500080
Created May 2, 2013 04:04
リンクをマウスオンアウトでフェードインアウトさせる
$ ->
$('.fade').each (i, el) =>
$(el).mouseenter ->
$(@).stop().fadeTo(300, .2)
$(el).mouseleave ->
$(@).stop().fadeTo(300, 1.0)
@is8r
is8r / gist:5500507
Last active December 16, 2015 21:29
数値に3桁毎にカンマを入れる
number2Price = (n) ->
n.toString().replace /(\d)(?=(\d\d\d)+$)/g, '$1,'
@is8r
is8r / gist:5500541
Last active December 16, 2015 21:29
数字で3桁毎にカンマが入った文字列を数値に変換する
price2Int = (n) ->
parseInt n.toString().split(",").join("")
@is8r
is8r / gist:5503310
Created May 2, 2013 16:14
スマートフォンでアドレスバーを隠す
window.scrollTo 0, 1 if navigator.userAgent.match(/iPhone|iPod|Android/i) and window.location.href.indexOf("#") is -1 and document.body.scrollTop is 0
@is8r
is8r / gist:5515421
Last active December 16, 2015 23:39
rgbaのような指定方法で16進数の色を半透明にする
@function rgb16a($color-code, $opacity)
@return rgba(red($color-code), green($color-code), blue($color-code), $opacity)
@is8r
is8r / gist:5520007
Created May 5, 2013 07:15
utf-8を指定する
# coding: utf-8
@is8r
is8r / gist:5520314
Created May 5, 2013 09:39
クラスの書き方
class Test
def initialize
@value = 10
end
attr_accessor :value
end
@is8r
is8r / gist:5523008
Created May 6, 2013 02:08
クリック
$(".btn").on 'click', (e) =>
return false