Skip to content

Instantly share code, notes, and snippets.

View FumiyaShibusawa's full-sized avatar

Fumiya Shibusawa FumiyaShibusawa

  • Tokyo
View GitHub Profile
@znz
znz / before_action.rb
Created September 4, 2019 11:37
最低限の before_action っぽいもの
class Foo
def self.before_action(hook, only:)
actions = Array(only)
self.prepend Module.new {
actions.each do |action|
class_eval <<-RUBY, __FILE__, __LINE__+1
def #{action}
#{hook}
super
end
@beesandbombs
beesandbombs / polygonWalkers.pde
Created July 26, 2017 23:30
polygon walkers
// by dave @beesandbombs
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {