Skip to content

Instantly share code, notes, and snippets.

View keizo042's full-sized avatar

Koichi Nakanishi keizo042

  • japanese company
  • Japan
View GitHub Profile
@keizo042
keizo042 / DSL.rb
Last active February 17, 2016 03:37
class VCL
attr_accessor :resp, :beresp, :req, :bereq, :import, :obj, :client
def initialize
@resp = nil
@beresp = nil
@req = nil
@bereq = VCL::HTTP.new
@import = nil
@keizo042
keizo042 / vmod_mruby.rb
Created February 12, 2016 13:48
vmod_mruby try to struct DSL
Varnish::VCL.init(something) do
VCL.return VCL::OK
end
Varnish::VCL.pass(something)do
end
Varnish::VCL.deliver() do
end
Varnish:VCL.ban() do
@keizo042
keizo042 / gist:4fe869a9529e665671fc
Created February 8, 2016 17:37
twitterのお遊び 帰れまてん回答
好きなアニメ当てるまで帰れま10
ガンスリンガーガール
キューティクル探偵因幡
ラストエグザイル
未確認で進行形
ダンタリアンの書架
人類は衰退しました
神さまのいない日曜日
サカサマのパテマ
流星のロックマン
@keizo042
keizo042 / args_test.c
Last active February 2, 2016 13:17
mrubyでblockを取り回したい、そのいち
#include <stdio.h>
#include <stdlib.h>
#include "mruby.h"
#include "mruby/compile.h"
mrb_value mrb_f(mrb_state *mrb,mrb_value self)
{
mrb_value v;
@keizo042
keizo042 / ann.md
Last active August 29, 2015 14:23
関数型言語勉強会 in 飯塚 草案

飯塚版関数型言語勉強会Vol.1

今や、よく目にする関数型言語と言う言葉。実際、どういうものなの? 関数型言語つかってみたんだけどわけわかんない! なんどやっても挫折するけど今度こそ! 関数型言語を使う同士達よ集まれ! みたいな勉強会です。

====================================

今回メンバー構成

import Data.Char
main :: IO ()
main = print $ foldl1 (+) ( map ord ['\NUL'..'\n'])
@keizo042
keizo042 / Restricted2.go
Last active August 29, 2015 14:21
Restricted wordそのさん
package main
import (
"fmt"
"reflect"
)
type Hello struct {
@keizo042
keizo042 / Restricted.go
Created May 11, 2015 10:36
Restricted Wordsその二
package main
import (
"fmt"
"reflect"
)
type Hello struct {
a int `hello world`
}
@keizo042
keizo042 / hello.go
Created May 11, 2015 10:21
Restricted Words
package main
import (
"fmt"
"go/parser"
)
func main() {
d := parser.AllErrors + parser.SpuriousErrors + parser.ParseComments
e := d + parser.PackageClauseOnly
@keizo042
keizo042 / reasonable-lens.log
Created April 15, 2015 06:32
reasonable-lens build failure
[1 of 7] Compiling Control.Lens.Util.TH ( src/Control/Lens/Util/TH.hs, dist/dist-sandbox-f2c360e3/build/Control/Lens/Util/TH.o )
src/Control/Lens/Util/TH.hs:23:10:
Not in scope: data constructor ‘ClassP’
Perhaps you meant one of these:
‘ClassD’ (imported from Language.Haskell.TH),
‘ClassI’ (imported from Language.Haskell.TH),
variable ‘classP’ (imported from Language.Haskell.TH)
src/Control/Lens/Util/TH.hs:23:25: