Skip to content

Instantly share code, notes, and snippets.

View aoitaku's full-sized avatar
🍷
ぶどうジュース

aotak aoitaku

🍷
ぶどうジュース
View GitHub Profile
@aoitaku
aoitaku / forwardable.rb
Last active July 8, 2016 14:38
forwardable を拡張する
require 'forwardable'
module Forwardable
def delegate_to(accessor, *methods, **method_hash)
methods.each do|method|
def_instance_delegator(accessor, method)
end
method_hash.each do|method, ali|
def_instance_delegator(accessor, method, ali)
@aoitaku
aoitaku / forwardable.rb
Created July 8, 2016 14:36
forwardable を拡張する
require 'forwardable'
module Forwardable
def delegate_to(accessor, *methods, **method_hash)
methods.each do|method|
def_instance_delegator(accessor, method)
end
method_hash.each do|method, ali|
def_instance_delegator(accessor, method, ali)
--- a/cygwin/GNUmakefile.in Thu Jan 01 08:38:01 2015
+++ b/cygwin/GNUmakefile.in Mon May 23 01:50:00 2016
@@ -50,11 +50,11 @@
$(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO)
$(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
-%.res.@OBJEXT@: %.rc
+%.res.@OBJEXT@: %.rc %.size
$(ECHO) compiling $@
$(Q) $(WINDRES) --include-dir . --include-dir $(<D) --include-dir $(srcdir)/win32 $< $@
@aoitaku
aoitaku / arb.rb
Last active December 28, 2015 08:22
arb.rb
require 'zlib'
module Kernel
alias require_without_arb require
alias require_relative_without_arb require_relative
def require(filename)
if ArchivedRuby.arb_loaded?
return if $LOADED_FEATURES.include?(filename)
ArchivedRuby.load_from_arb(filename)
@aoitaku
aoitaku / animative.rb
Created December 9, 2015 13:49
DXRuby::Animative
require_relative 'anime_sprite'
module DXRuby
class Animation < Struct.new(:animation_image, :motions)
end
module Animative
class Motion < Struct.new(:name, :delay, :pattern)
@aoitaku
aoitaku / NonmaskedWindowOverlay.js
Created November 14, 2015 02:59
NonmaskedWindowOverlay.js
//=============================================================================
// NonmaskedWindowOverlay.js
//=============================================================================
/*:
* @plugindesc ウィンドウをマスクせずに重ね合わせられるようにします。
* @author aoitaku
* @version 0.0.1 2015/11/15
*
* @param nonmaskedScene
@aoitaku
aoitaku / sfx-support.patch
Created August 30, 2015 17:57
sfx-support.patch
diff -uprN a/cygwin/GNUMakefile.in b/cygwin/GNUMakefile.in
--- a/cygwin/GNUMakefile.in 2012-11-05 23:00:35 +0900
+++ b/cygwin/GNUMakefile.in 2015-08-24 13:32:16 +0900
@@ -50,11 +50,11 @@ scriptbin: $(SCRIPTPROGRAMS)
$(LIBRUBY): $(RUBY_EXP) $(LIBRUBY_SO)
$(RUBY_EXP) $(LIBRUBY_SO): $(DLL_BASE_NAME).res.@OBJEXT@
-%.res.@OBJEXT@: %.rc
+%.res.@OBJEXT@: %.rc %.size
$(ECHO) compiling $@
@aoitaku
aoitaku / tsukasa_parser.rb
Last active August 29, 2015 14:27
TsukasaParser
# TsukasaParser
#
# Usage:
# gem install parslet するか、
# bundler で Gemfile に gem 'parslet' を書いて
# bundle install して bundle exec で利用してください
require 'parslet'
class TsukasaParser < Parslet::Parser
class Symbol
def call(*args, &block)
if block
-> recv { to_proc.(recv, *args, &block) }
else
-> recv { to_proc.(recv, *args) }
end
end
end
@aoitaku
aoitaku / stmt.slim
Last active August 29, 2015 14:15
slim で xml を書く
doctype xml
var a = rand
if a == 6
then
puts "six!"
elsif a == 1
then
puts "one..."
else