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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
Fix:バグ修正 | |
Add:新規(ファイル)機能追加 | |
Modify:機能修正(バグではない) | |
Remove:削除(ファイル) | |
Update:更新 | |
ex. | |
Modify トップページバナー差し替え |
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
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
git config --global alias.lga "log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
git config --global alias.graph "log --graph --date-order --all --pretty=format:'%h %Cred%d %Cgreen%ad %Cblue%cn %Creset%s' --date=short" |
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
/* global define */ | |
define({ | |
init:function(func, args){ | |
window.requestAnimationFrame = window.requestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function( callback ){ | |
window.setTimeout(callback, 1000 / 60); |
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
function jadeDataFunc(env){ | |
return function(dest, srcAr){ //dest が生成するhtml、srcが参照元jadeファイル | |
var _ = grunt.util._, | |
regDest = /\/([A-Za-z_0-9-]+?)\.html/, | |
destName = dest.match(regDest)[1], | |
dataPath = "src/jade/json/" + destName + ".json", | |
mergeData, | |
data; | |
try { |
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
function jadeDataFunc(env) { | |
return function(dest, srcAr) { //dest が生成するhtml、srcが参照元jadeファイル | |
var _ = grunt.util._, | |
regDest = /\/([A-Za-z_0-9-]+?)\.html/, | |
destName = dest.match(regDest)[1], | |
dataPath = "src/jade/json/" + destName + ".json", | |
mergeData = _.clone(grunt.file.readJSON("src/jade/json/_common.json")), | |
data; |
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
.sans-serif { | |
font-family: Verdana, "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Meiryo, "メイリオ", sans-serif; | |
} | |
.serif { | |
font-family: font-family: "Times New Roman", "游明朝", YuMincho, "ヒラギノ明朝 ProN W3", "Hiragino Mincho ProN", "メイリオ", Meiryo, serif; | |
} |
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
/*global $, Modernizr */ | |
/* | |
* @require jquery.mousewheel.js | |
*/ | |
function stopMouseWheel(enabled){ | |
if(Modernizr.touch){ | |
return; | |
} | |
if(enabled) { | |
var wheel = function(event) { |
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
// img elems | |
if(typeof window.addEventListener == 'undefined' && typeof document.getElementsByClassName == 'undefined') { | |
$('img').each(function() { | |
var $this = $(this), | |
src = $this.attr('src'); | |
if(src.indexOf('.png') != -1) { | |
$this.css({ | |
'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + src + '", sizingMethod="scale");' | |
}); | |
} |
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
function runPosFixed(){ | |
$(".js-pos-fixed").css("left", - Math.floor($(window).scrollLeft()) + "px"); | |
} | |
$win.on("load scroll resize", function () { | |
runPosFixed(); | |
}); |