Skip to content

Instantly share code, notes, and snippets.

View nenjiru's full-sized avatar

Minoru Nakanou nenjiru

View GitHub Profile
@nenjiru
nenjiru / zeroPadding.js
Created October 16, 2010 02:15
ゼロパディング
/**
* ZeroPadding.
*
* @param {String|Number} number
* @return {String}
*
* @example
* "009" = zeroPadding(9, 3);
*/
function zeroPadding(number, size) {
@nenjiru
nenjiru / DrawCircle.js
Created December 7, 2010 06:36
canvasに円を描く
////////////////////////////////////////////////////////////////////////////////
// DrawCircle / DrawArc
// canvasに円を描く
//
// Copyright (c) 2010 Minoru Nakanow
// Licensed under the MIT licenses.
// http://www.opensource.org/licenses/mit-license.html
//
// Usage:
// var circle = new DrawCircle(canvas);
@nenjiru
nenjiru / PolarClock.js
Created December 7, 2010 06:38
ポーラークロック
/////////////////////////////////////////////////////////////////////////////////
// PolarClock
// ポーラークロック
//
// Copyright (c) 2010 Minoru Nakanow
// Licensed under the MIT licenses.
// http://www.opensource.org/licenses/mit-license.html
//
// Usage:
// var point = new Point(120, 120, 120);
@nenjiru
nenjiru / gitdiff.sh
Created November 21, 2011 02:20
Gitで指定したリビジョンとの差分ファイルを出力する
#!/bin/sh
if [ "$#" -lt 2 ]
then
echo "usage: gitdiff [target] [export]"
echo "example: gitdiff master ../files"
exit 1
fi
## Export directory
@nenjiru
nenjiru / loading.js
Created May 17, 2012 16:24
Pre loader js
////////////////////////////////////////////////////////////////////////////////
// loading
////////////////////////////////////////////////////////////////////////////////
;(function(w, d, b) {
'use strict';
//--------------------------------------------------------------------------
// Variables
//--------------------------------------------------------------------------
var isMSIE = /*@cc_on!@*/false;
@nenjiru
nenjiru / EventDispatcher.js
Created July 20, 2012 08:09
Event dispatcher js
////////////////////////////////////////////////////////////////////////////////
// EventDispatcher.js
////////////////////////////////////////////////////////////////////////////////
;namespace.event.EventDispatcher = (function(win, doc, ns)
{
"use strict";
//--------------------------------------------------------------------------
// Import
//--------------------------------------------------------------------------
@nenjiru
nenjiru / .bash_profile
Created October 7, 2012 03:14
bash_profile
if [ -f ‾/.bashrc ]; then . ‾/.bashrc
fi
@nenjiru
nenjiru / .bashrc
Created October 7, 2012 03:15
bashrc
#Alias
alias safari='open -a safari'
alias apastart='sudo /usr/sbin/apachectl start'
alias apastop='sudo /usr/sbin/apachectl stop'
alias apare='sudo /usr/sbin/apachectl restart'
#Git settings
source /usr/local/Cellar/git/1.7.9.2/etc/bash_completion.d/git-completion.bash
GIT_PS1_SHOWDIRTYSTATE=true
@nenjiru
nenjiru / .gitconfig
Created October 7, 2012 03:16
gitconfig
[color]
ui = auto
[user]
name = minoru nakanou
email = [email protected]
[alias]
ci = commit
co = checkout
st = status
br = branch
@nenjiru
nenjiru / .gitignore
Created October 7, 2012 03:17
gitignore
.DS_Store
.sass-cache/
.idea/