This file contains hidden or 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
// スマホ用 疑似ホバー | |
$('a, input[type="button"], input[type="submit"], button').on('touchstart', function() { | |
$(this).addClass('hover'); | |
}).on('touchend', function() { | |
$(this).removeClass('hover'); | |
}); |
This file contains hidden or 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
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
autocmd vimenter * NERDTree | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif | |
set nocompatible | |
set fileformats=unix,dos,mac | |
set title |
This file contains hidden or 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
!!! 5 | |
%html | |
%head | |
%meta(charset="utf-8") | |
%title="demo" | |
%script(src="http://code.createjs.com/createjs-2013.02.12.min.js") | |
%script(src="foo9.createjs.tooltip.js") | |
:css | |
canvas { | |
background: #abc; |
This file contains hidden or 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 canvas = document.getElementById("testCanvas"); | |
var stage = new createjs.Stage(canvas); | |
var letters = ["test", "日本語", "abcカタカナ", "1234567890"]; | |
for (var i = 0, iz = letters.length; i < iz; i++) { | |
var label = new foo9.createjs.Label(letters[i], "12px Arial", "#000", "#fff"); | |
stage.addChild(label); | |
label.y = 20 * i; | |
} |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title></title> | |
</head> | |
<body> | |
<h1>test</h1> | |
</body> | |
</html> |
This file contains hidden or 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
/* | |
* ShuffleText by Yasunobu Ikeda. Feb 3, 2012 | |
* Visit http://clockmaker.jp/ for documentation, updates and examples. | |
* | |
* | |
* Copyright (c) 2012 Yasunobu Ikeda | |
* | |
* Permission is hereby granted, free of charge, to any person | |
* obtaining a copy of this software and associated documentation | |
* files (the "Software"), to deal in the Software without |
This file contains hidden or 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 FPS = 60; | |
var canvas = document.getElementById("testCanvas"); | |
var stage = new createjs.Stage(canvas); | |
if (createjs.Touch.isSupported()) { | |
createjs.Touch.enable(stage, false, false); | |
} | |
createjs.Ticker.setFPS(FPS); | |
createjs.Ticker.addEventListener("tick", handleTick); |
This file contains hidden or 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
class StyleSheet | |
constructor: () -> | |
@cssRule = null | |
parseCSS: (CSSText) -> | |
parser = new CSSParser() | |
@cssRule = parser.parse CSSText | |
return | |
# TODO: |
This file contains hidden or 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 array = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; | |
var size = 2; | |
var result = chunk(array, size); | |
// console.log(result); // [['a', 'b'], ['c', 'd'], ['e', 'f'], ['g']] | |
function chunk(array, size) { | |
var len = array.length; | |
var index = 0; | |
var result = []; |
This file contains hidden or 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 canvas, doAnim, endPoint, getPoint, line, stage, startPoint, t; | |
function getPoint(p1, p2, t) { | |
var x, x1, x2, y, y1, y2; | |
x1 = p1.x; | |
y1 = p1.y; | |
x2 = p2.x; | |
y2 = p2.y; | |
x = (x2 - x1) * t + x1; |