Skip to content

Instantly share code, notes, and snippets.

@kozaru
kozaru / touchevent.js
Last active August 29, 2015 13:59
jQuery-TouchEvent
+function ($) {
'use strict';
$(window).bind('touchstart', function() {
this.pageX = event.changedTouches[0].pageX; // X
this.pageY = event.changedTouches[0].pageY; // Y
console.log("start:",this.pageX,this.pageY);
});
$(window).bind('touchmove', function() {
this.pageX = event.changedTouches[0].pageX; // X
@kozaru
kozaru / meta.txt
Created April 22, 2014 08:04
IEに互換表示をさせないX-UA-Compatible
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

ふにセミ Sketch 3

Sketch 3

基本操作(知っておくと便利なもの)

  • 選択ツールがない。やじるがデフォ
  • ショートカットをもう一回押せば、解除
  • グループ化はフォルダ
  • グループ化解除は、フォルダの外に出せばOK
@kozaru
kozaru / font-family
Last active August 29, 2015 14:03
font-family
$font-family-maru: "ヒラギノ丸ゴ ProN W4", "Hiragino Maru Gothic ProN", Meiryo,"メイリオ", "MS Pゴシック", Arial, sans-serif;
$font-family-kaku:'ヒラギノ角ゴ Pro W3','Hiragino Kaku Gothic Pro','メイリオ','Meiryo','MS Pゴシック',sans-serif;
$font-family-min: 'Hiragino Mincho ProN', 'ヒラギノ明朝 ProN W3','MS P明朝','MS PMincho','MS 明朝',Georgia, 'Times New Roman', Times, serif;
@kozaru
kozaru / gist:ee8df2627216b72e6b8a
Created August 7, 2014 01:27
position: absolute; を上下左右中央配置にする方法
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.test {
position: absolute;
top: auto;
left: auto;
$i: 60;
@while $i >= 0 {
.mtop-#{$i} { margin-top: 1px * $i; }
.mbtm-#{$i} { margin-bottom: 1px * $i; }
$i: $i - 1;
}
@kozaru
kozaru / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kozaru
kozaru / gist:81cb0bc7177cd89605233303f3e396d1
Created July 24, 2016 06:39
JSWarrior 途中 kazutake
jsWarrior.turn = function(warrior) {
// 前に敵がいたら
if(warrior.check() == "enemy") {
   // 敵をアタック
   warrior.attack();
// 前に敵がいなかったら
} else {
@kozaru
kozaru / test.ino
Created August 25, 2016 14:09
LilyPad グランパ
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the Uno and
Leonardo, it is attached to digital pin 13. If you're unsure what
pin the on-board LED is connected to on your Arduino model, check
the documentation at http://arduino.cc
This example code is in the public domain.