Skip to content

Instantly share code, notes, and snippets.

View nenjiru's full-sized avatar

Minoru Nakanou nenjiru

View GitHub Profile
@nenjiru
nenjiru / FrameAnimation.js
Created October 14, 2012 13:08
Frame animation object
////////////////////////////////////////////////////////////////////////////////
// Frame animation object
////////////////////////////////////////////////////////////////////////////////
;namespace.display.FrameAnimation = (function(win, doc, ns)
{
"use strict";
//--------------------------------------------------------------------------
// Import
//--------------------------------------------------------------------------
var AnimationEvent = ns.event.AnimationEvent,
@nenjiru
nenjiru / ArrayExtension.js
Created January 15, 2013 05:25
Array extension
/*
* Array clone
*/
Array.prototype.clone = function()
{
return this.concat([]);
}
/*
* Max value (only number
@nenjiru
nenjiru / Cakefile
Created March 12, 2013 11:29
Cakefile for coffee script
# http://qiita.com/items/57ccb570f02799efd9d3
fs = require 'fs'
path = require 'path'
{spawn, exec} = require 'child_process'
option '-o', '--output [DIR]', 'Output directory.'
option '-t', '--target [DIR]', 'Watch target directory.'
@nenjiru
nenjiru / jQuery.template.js
Created April 12, 2013 13:04
jQuery template
/**
* jQuery extend
*/
jQuery.fn.extend({
/**
* plugin
*
* @param {Object} argument comment
*/
plugin: function(args)
@nenjiru
nenjiru / toQuery.js
Created June 14, 2013 06:26
オブジェクトをクエリーにする
/**
* オブジェクトをクエリーにする
* @param obj {Object}
* @returns {String}
* @private
*/
toQuery = function(obj)
{
var query = '';
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Say voice="woman" language="ja-jp">こんちには、こんちには。ゆっくりしていってね</Say>
</Response>
@nenjiru
nenjiru / artnet.js
Last active April 21, 2018 13:28
Artnet for NodeJS
/*
--------------------------------------------------------------------------------
Config
--------------------------------------------------------------------------------
*/
var dgram = require('dgram')
, Buffer = require('buffer').Buffer;
var HEADER = [65, 114, 116, 45, 78, 101, 116, 0, 0, 80, 0, 14, 0, 0, 0, 0];
@nenjiru
nenjiru / vimrc
Created March 16, 2015 02:10
vimrc
""""""""""""""""""""""""""""""""""""""""
" プラグイン管理
""""""""""""""""""""""""""""""""""""""""
" MacVimを初期化した場合は、以下
" mkdir -p ~/.vim/bundle
" git clone https://github.com/Shougo/neobundle.vim
" git clone https://github.com/Shougo/vimproc.vim.git ~/.vim/bundle/vimproc.vim
" cd ~/.vim/bundle/vimproc.vim
" make
"
@nenjiru
nenjiru / ogp.html
Created March 16, 2015 13:54
OGP template
<!DOCTYPE HTML>
<html lang="ja">
<head prefix="og: http://ogp.me/ns# fb: http://www.facebook.com/2008/fbml">
<meta charset="UTF-8" />
<title></title>
<meta name="viewport" content="width=device-width" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="" />
<meta property="fb:app_id" content="" />
/**
* 基底クラス
* @file base.js
*/
function Base ()
{
this.position = { x:0, y:0, z:0 };
}
Base.prototype.update = function ()