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 / collision.vim
Created November 29, 2014 12:34
vim plugin collision xml.vim typescript.vim
"keizo'vimrc
if has('vim_starting')
set nocompatible " Be iMproved
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
filetype indent off
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
@keizo042
keizo042 / samidare.rb
Last active August 29, 2015 14:13
軽空母美人さん揃いだねぇ
# encoding : utf-8
module Kankore
attr_accessor :長門, :陸奥, :伊勢, :日向, :雪風, :赤城, :加賀, :蒼龍, :飛龍, :島風,
:吹雪, :白雪, :初雪, :深雪, :叢雲, :磯波, :綾波, :敷波,
:大井, :北上,
:金剛, :比叡, :榛名, :霧島,
:鳳翔,
:扶桑, :山城, :天龍, :龍田, :龍驤,
:睦月, :如月, :皐月, :文月, :長月, :菊月, :三日月, :望月,
:球磨, :多摩, :木曽,
@keizo042
keizo042 / ghr.go
Created January 20, 2015 17:00
ghc pretty wrapper for easy compile on sandbox (under MITL, author keizo)
package main
import (
"flag"
"fmt"
"os"
"os/exec"
)
func main() {
import Control.Monad.Writer
sayHello :: Writer (Sum Int, Sum Int) String
sayHello = do
tell (0,1)
return "hello"
sayGoodbye :: Writer (Sum Int, Sum Int) String
sayGoodbye = do
@keizo042
keizo042 / webapp.go
Created February 19, 2015 18:51
てきとーなWebapp
package main
/*
git clone して
go build webapp.go
./webapp
としたあと
http://localhost:8080
にアクセス
*/
WORK=/tmp/go-build685671399
mkdir -p $WORK/net/rpc/_obj/
mkdir -p $WORK/net/
cd /usr/lib/go/src/net/rpc
/usr/lib/go/pkg/tool/linux_amd64/6g -o $WORK/net/rpc.a -trimpath $WORK -p net/rpc -complete -D _/usr/lib/go/src/net/rpc -I $WORK -pack ./client.go ./debug.go ./server.go
mkdir -p /usr/lib/go/pkg/linux_amd64/net/
cp $WORK/net/rpc.a /usr/lib/go/pkg/linux_amd64/net/rpc.a
go install net/rpc: open /usr/lib/go/pkg/linux_amd64/net/rpc.a: permission denied
@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:
@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 / Restricted.go
Created May 11, 2015 10:36
Restricted Wordsその二
package main
import (
"fmt"
"reflect"
)
type Hello struct {
a int `hello world`
}
@keizo042
keizo042 / Restricted2.go
Last active August 29, 2015 14:21
Restricted wordそのさん
package main
import (
"fmt"
"reflect"
)
type Hello struct {