Skip to content

Instantly share code, notes, and snippets.

View ne-sachirou's full-sized avatar

さっちゃん ne-sachirou

View GitHub Profile
@ne-sachirou
ne-sachirou / README.txt
Last active August 29, 2015 14:10
Gassen Animation Demo (CSS+JavaScript) http://jsdo.it/ne_sachirou/7wwz
Gassen Animation Demo
https://gist.github.com/ne-sachirou/48f02783837cf712286a
Author : ne_Sachirou <utakata.c4se@gmail.com>
Date : 2014-2014
License : GPLv3 or later http://www.gnu.org/licenses/gpl.html
Music:
1. hainezu (FuniSaya,Crain) "gad1" CC by-sa 2014
2. hainezu (FuniSaya,Crain) "gad2" CC by-sa 2014
@ne-sachirou
ne-sachirou / README
Created November 29, 2014 11:09
Circle Hover 3D rotation Demo http://jsdo.it/ne_sachirou/cWknc
Circle Hover rotation Demo
Author : ne_Sachirou <utakata.c4se@gmail.com>
Date : 2014-2014
License : GPLv3 www.gnu.org/licenses/gpl.html
@ne-sachirou
ne-sachirou / README
Last active August 29, 2015 14:11
JS コメントで型注釈を書き実行時に自動で型検査
TypeScriptやFlowやAtScriptやES6を使はずに、関数にコメントを書くことで型註釋[注釈]を行なひ、
実行時に自動で検査します。
例:
var f = typed(function (a/*:string*/)/*:number*/ {
return a;
});
var g = typed(function (a/*:number*/, b/*:number?*/)/*:number*/ {
b = b || 0;
@ne-sachirou
ne-sachirou / count.exs
Created April 16, 2015 00:49
Elixir short sample.
defmodule Count do
def f parent, cnt do
send parent, {:print, cnt}
receive do
:up -> Count.f parent, cnt + 1
_ ->
send parent, {:print, "バカ"}
Count.f parent, cnt
end
end
@ne-sachirou
ne-sachirou / container.rb
Last active August 29, 2015 14:19
DI (IoC) container in Ruby.
class Container
def initialize
@c = {}
@fac = {}
yield self
end
def [] k
@c[k] || (@fac[k] && @fac[k].call(self))
end
@ne-sachirou
ne-sachirou / enum_case.rb
Created April 30, 2015 06:49
Ruby Enumerableを(パターン)マッチで分岐
class Matcher
def initialize enum
@enum = enum
@patterns = []
@else = nil
end
def with pattern, &b
@patterns << [pattern, b, []]
end
@ne-sachirou
ne-sachirou / AzureaVim.js
Created February 18, 2011 11:42
AzureaVim.js #AzureaScript
// @author = http://c4se.sakura.ne.jp/profile/ne.html
// @date = 2011-02-23
// @site = https://gist.github.com/833567
// @license = public domain
var COMMANDS_LIST = {
open: 'open',
o: 'open',
url: 'open url',
@ne-sachirou
ne-sachirou / unshorten.js
Created February 20, 2011 00:52
短縮URLを伸展する #AzureaScript
// @author = http://c4se.sakura.ne.jp/profile/ne.html
// @date = 2011-02-25
// @site = https://gist.github.com/835563
// @license = public domain
var services = [],
cashe = {
'http://c4se.tk/': 'http://c4se.sakura.ne.jp/'
};
@ne-sachirou
ne-sachirou / notify.js
Created February 20, 2011 14:17
notify.js #AzureaScript
// ==AzureaScript==
// @author http://c4se.sakura.ne.jp/profile/ne.html
// @scriptUrl http://c4se.sakura.ne.jp/widgets/azurea/
// @date 2011-03-13
// @site https://gist.github.com/835993
// @license public domain
// ==/AzureaScript==
var _notify;
@ne-sachirou
ne-sachirou / AzureaUtil.js
Created February 24, 2011 03:33
AzureaUtil.js #AzureaScript
// @author = http://c4se.sakura.ne.jp/profile/ne.html
// @date = 2011-02-24
// @site =
// @license = public domain
var AzureaUtil = {};
AzureaUtil.event = {};
AzureaUtil.time = {};