This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (grunt) -> | |
# package.jsonをロード | |
config = | |
pkg: grunt.file.readJSON('package.json') | |
# Gruntプラグインをロード | |
Object.keys(config.pkg.devDependencies).forEach (key) -> | |
if /^grunt-/.test(key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" zen-codingの設定 | |
let g:user_zen_expandabbr_key = '<D-Return>' | |
let g:user_zen_next_key = '<D-C-,>' | |
let g:user_zen_prev_key = '<D-C-;>' | |
let g:user_zen_settings = { | |
\ 'html': { | |
\ 'indentation': '', | |
\ 'empty_element_suffix': '>', | |
\ 'snippets': { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = (grunt) -> | |
grunt.task.loadNpmTasks 'grunt-shell' | |
shell: | |
reload: | |
command: 'osascript -e \'tell application "Google Chrome" to reload active tab of window 1\'' | |
# apply in watch task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array.prototype.shuffle = function() { | |
var i = this.length; | |
while(i){ | |
var j = Math.floor(Math.random()*i); | |
var t = this[--i]; | |
this[i] = this[j]; | |
this[j] = t; | |
} | |
return this; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MY.device | |
* UserAgentから判別してデバイスを振り分けるためのメソッド | |
*/ | |
MY.device = (function () { | |
var _ua = window.navigator.userAgent; | |
var ua, type; | |
// iPhone || iPod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* orientation | |
* デバイスの向きに合わせてhtml要素にclassを付与 | |
* * 縦:orientationV | |
* * 横:orientationH | |
*/ | |
var orientation = (function () { | |
var $window, $body; | |
var orientation = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in "http://www.example.com/index.html" "http://www.example.com/hoge/hoge.html" | |
do | |
wget -p -nc -nv $i | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MYAPPNAME = MYAPPNAME || {}; | |
MYAPPNAME.ui = MYAPPNEAME.ui || {}; | |
MYAPPNAME.util = MYAPPNAME.util || {}; | |
(function (MY, UI, UTIL, $, window, undefined) { | |
})(MYAPPNAME, MYAPPNAME.ui, MYAPPNAME.util, jQuery, this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in `find ./ -name *.htm*`; | |
do | |
if test `nkf -g $f` != 'Shift_JIS'; | |
then | |
echo $f; | |
fi | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: #FFC; | |
} |