Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / 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 / example.html
Created October 15, 2010 13:55
Flickrのフォトセットを自動再生 jQuery Plugin
<html lang="ja">
<head>
<meta charset="utf-8">
<title>jquery.getphotos.js</title>
<style type="text/css">
* {
border: none;
list-style: none;
}
@nenjiru
nenjiru / dateset.js
Created October 15, 2010 03:32
日付処理
////////////////////////////////////////////////////////////////////////////////
// Dateset
// 指定期間の日付/曜日の出力など
// Copyright 2010, Minoru Nakanou
// Licensed under the MIT licenses.
// http://www.opensource.org/licenses/mit-license.html
////////////////////////////////////////////////////////////////////////////////
(function() {
/**
* @private
@nenjiru
nenjiru / jquery.smartScroll.js
Created October 15, 2010 03:13
スムーズスクロール jQuery Plugin
////////////////////////////////////////////////////////////////////////////////
// Smart scroll - jQuery Plugin
// ページをまたいで作動するスムーズスクロール
//
// Copyright 2010, Minoru Nakanow
// Licensed under the MIT licenses.
// http://www.opensource.org/licenses/mit-license.html
//
// Usage:
// $("a[href^='#']:not([target])").pageScroll();
@nenjiru
nenjiru / jquery.newWindow.js
Created October 15, 2010 03:11
別窓展開 jQuery plugin
////////////////////////////////////////////////////////////////////////////////
// Open new window - jQuery plugin
// target属性で指定する別窓展開プラグイン
//
// Copyright 2010, Minoru Nakanow
// Licensed under the MIT licenses.
// http://www.opensource.org/licenses/mit-license.html
//
// Usage:
// <a href="example.html?width=full&height=full" target="new">全画面展開</a></p>
@nenjiru
nenjiru / jquery.stripeTable.js
Created October 15, 2010 03:08
ストライプテーブル jQuery Plugin
////////////////////////////////////////////////////////////////////////////////
// Add a classname to the alternate - jQuery Plugin
// 交互にクラス名を付与してストライプなテーブルを作成
//
// Copyright 2010, Minoru Nakanow
// Licensed under the MIT licenses.
// http://www.opensource.org/licenses/mit-license.html
//
// Usage:
// $("table").stripeTable();