Skip to content

Instantly share code, notes, and snippets.

View katapad's full-sized avatar

Yoshio Kakehashi katapad

View GitHub Profile
@katapad
katapad / .htaccess
Created May 31, 2013 13:38
teaserとmainとspとpcを切り分けるhtaccess
<Files .htaccess>
order allow,deny
deny from all
</Files>
DirectoryIndex index.html
RewriteEngine On
@katapad
katapad / memo.css
Created June 10, 2013 09:45
back-faceがある。
* { -webkit-backface-visibility: hidden; }
@katapad
katapad / index.jade
Created June 18, 2013 12:52
jadeの:markdownフィルターとcoffeeフィルター + 外部ファイル読み込み
html
head
body
h1 マークダウンのテストです
#mdBlock
:markdown
# markdownで見出し1
@katapad
katapad / upload_google_cloud_storage.sh
Created July 5, 2013 13:24
Google Cloud Storageのコマンド
# https://developers.google.com/storage/docs/gsutil/commands/cp?hl=ja
#全部アップロード & パブリック
gsutil cp -a public-read -R ./ gs://my-bucket-name
# 特定のディレクトリをアップロード
gsutil cp -a public-read -R ./www/** gs://my-bucket-name
#全部削除
@katapad
katapad / sh
Created July 16, 2013 09:38
AIR SDKをマージするときに使うコマンド。 sdkディレクトリにtbz2 をほりこんでからやる
tar jxvf AdobeAIRSDK.tbz2
@import "compass/css3/user-interface"
@mixin smartphone-init
*-webkit-tap-highlight-color: rgba(0, 0, 0, 0)
-webkit-touch-callout: none
*:not(input)
+user-select(none)
@mixin overflow-scroll()
@katapad
katapad / _loading.sass
Last active December 21, 2015 10:19
CSS3で 天地センター
@import "compass/css3/box"
#loading
width: 100%
height: 100%
+display-box
+box-pack(center)
+box-align(center)
@katapad
katapad / user-select.sass
Last active December 21, 2015 12:28
user-select: none のやつ。notを使うとiOSでうまくいかないので、個別にやる
//↓うまくいかない
//*:not(input,textarea)
// +user-select(none)
*
+user-select(none)
input, textarea
+user-select(auto !important)
@katapad
katapad / getImageSize.sh
Created September 9, 2013 13:43
画像のwidth, heightを取得するやつ
# jade
identify -format "src='img(%f', width=%w, height=%h, alt='')\n" *.(png|jpg|gif)
# coffee
identify -format "%f: width: %w, height: %h\n" *.(png|jpg|gif)
@katapad
katapad / getHostName.coffee
Created October 10, 2013 10:00
localhostのアドレスをパッと出すやつ
HOST_NAME = do ->
os = require('os')
interfaces = do os.networkInterfaces
checkLocal = (address)->
return address.family is 'IPv4' and not address.internal
# en0を優先
if _.has(interfaces, 'en0')
for address in interfaces['en0']
if checkLocal(address)
return address.address