Skip to content

Instantly share code, notes, and snippets.

View katapad's full-sized avatar

Yoshio Kakehashi katapad

View GitHub Profile

Untitled Slide

Welcome to Glide.

Glide is the easiest way to create useful slide for all of your Gists.

  • input key <- to go backward.
  • input key -> to go forward.

Publishing

@katapad
katapad / bower.json
Created February 5, 2014 11:26
最近のbower.json
{
"name": "__PROJECT_NAME__",
"version": "0.0.0",
"dependencies": {
"easeljs": "*",
"createjs-tweenjs": "*",
"createjs-preloadjs": "*",
"dat.gui": "*",
"greensock": "~1.11.5",
"jquery": "~2.1.0",
@katapad
katapad / convert.coffee
Created January 14, 2014 09:14
画像が奇数ピクセルだとスマホ表示でにじむので、偶数に変更するnodeスクリプト ref: http://qiita.com/katapad/items/261b277f1abe20018fa1
###
set even pixel
@use
https://github.com/rsms/node-imagemagick
@see
画像処理についてあれこれ: ImageMagickで、画像の上下左右に余白を追加する
http://goo.gl/kVfP9Q
@katapad
katapad / captureFrame.sh
Created January 8, 2014 12:38
複数のmp4の1フレーム目をmp4にするワンライナー。
find *.mp4 -exec ffmpeg -i {} -ss 0 -f image2 -vframes 1 {}.png \;
@katapad
katapad / key.md
Created December 14, 2013 03:52
Vichrome keymap

Normal Mode Mapping (nmap)

  • j : ScrollDown
  • : ScrollDown
  • k : ScrollUp
  • : ScrollUp
  • h : ScrollLeft
  • l : ScrollRight
  • : PageDown
  • : PageUp
@katapad
katapad / chmod.sh
Created November 7, 2013 07:27
再帰的にchmod。BacklogのWebDAVから取得したやつが700になっていたので。
$ find . -type f -exec chmod 644 \{\} \;
@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
@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 / 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 / _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)