Skip to content

Instantly share code, notes, and snippets.

View shogo82148's full-sized avatar
🏠
Working from home

ICHINOSE Shogo shogo82148

🏠
Working from home
View GitHub Profile
@shogo82148
shogo82148 / patch.diff
Created March 20, 2019 07:12
git diff HEAD...origin/support-multi-byte-char
diff --git a/diff/parse.go b/diff/parse.go
index ab481d0..12b54e8 100644
--- a/diff/parse.go
+++ b/diff/parse.go
@@ -136,9 +136,75 @@ func parseFileHeader(line string) (filename, timestamp string) {
ss := line[len(tokenOldFile)+1:]
tabi := strings.LastIndex(ss, "\t")
if tabi == -1 {
- return ss, ""
+ return unescapeCString(ss), ""
@shogo82148
shogo82148 / patch.diff
Created March 20, 2019 07:10
git diff HEAD...origin/support-multi-byte-char
diff --git a/diff/parse.go b/diff/parse.go
index ab481d0..12b54e8 100644
--- a/diff/parse.go
+++ b/diff/parse.go
@@ -136,9 +136,75 @@ func parseFileHeader(line string) (filename, timestamp string) {
ss := line[len(tokenOldFile)+1:]
tabi := strings.LastIndex(ss, "\t")
if tabi == -1 {
- return ss, ""
+ return unescapeCString(ss), ""
@shogo82148
shogo82148 / product.py
Last active February 28, 2019 07:22
2字の漢字の組み合わせを列挙する
import sys
import itertools
a = [l.rstrip() for l in sys.stdin]
for l in itertools.product(a, a):
print(''.join(l))
diff --git a/buildspec.yml b/buildspec.yml
index 64814a4..a5de100 100644
--- a/buildspec.yml
+++ b/buildspec.yml
@@ -22,5 +22,5 @@ phases:
fi
cache:
paths:
- - node_modules/**/*
- - vendor/**/*
startLoad &build.Package{Dir:"/usr/local/Cellar/go/1.11.1/libexec/src/crypto", Name:"crypto", ImportComment:"", Doc:"Package crypto collects common cryptographic constants.", ImportPath:"crypto", Root:"/usr/local/Cellar/go/1.11.1/libexec", SrcRoot:"/usr/local/Cellar/go/1.11.1/libexec/src", PkgRoot:"/usr/local/Cellar/go/1.11.1/libexec/pkg", PkgTargetRoot:"/usr/local/Cellar/go/1.11.1/libexec/pkg/darwin_amd64", BinDir:"/usr/local/Cellar/go/1.11.1/libexec/bin", Goroot:true, PkgObj:"/usr/local/Cellar/go/1.11.1/libexec/pkg/darwin_amd64/crypto.a", AllTags:[]string(nil), ConflictDir:"", BinaryOnly:false, GoFiles:[]string{"crypto.go"}, CgoFiles:[]string(nil), IgnoredGoFiles:[]string(nil), InvalidGoFiles:[]string(nil), CFiles:[]string(nil), CXXFiles:[]string(nil), MFiles:[]string(nil), HFiles:[]string(nil), FFiles:[]string(nil), SFiles:[]string(nil), SwigFiles:[]string(nil), SwigCXXFiles:[]string(nil), SysoFiles:[]string(nil), CgoCFLAGS:[]string(nil), CgoCPPFLAGS:[]string(nil), CgoCXXFLAGS:[]string(nil), CgoFFLAGS:[]st
This file has been truncated, but you can view the full file.
startLoad &build.Package{Dir:"/usr/local/Cellar/go/1.11.1/libexec/src/runtime/trace", Name:"trace", ImportComment:"", Doc:"Package trace contains facilities for programs to generate traces for the Go execution tracer.", ImportPath:"runtime/trace", Root:"/usr/local/Cellar/go/1.11.1/libexec", SrcRoot:"/usr/local/Cellar/go/1.11.1/libexec/src", PkgRoot:"/usr/local/Cellar/go/1.11.1/libexec/pkg", PkgTargetRoot:"/usr/local/Cellar/go/1.11.1/libexec/pkg/darwin_amd64", BinDir:"/usr/local/Cellar/go/1.11.1/libexec/bin", Goroot:true, PkgObj:"/usr/local/Cellar/go/1.11.1/libexec/pkg/darwin_amd64/runtime/trace.a", AllTags:[]string(nil), ConflictDir:"", BinaryOnly:false, GoFiles:[]string{"annotation.go", "trace.go"}, CgoFiles:[]string(nil), IgnoredGoFiles:[]string(nil), InvalidGoFiles:[]string(nil), CFiles:[]string(nil), CXXFiles:[]string(nil), MFiles:[]string(nil), HFiles:[]string(nil), FFiles:[]string(nil), SFiles:[]string(nil), SwigFiles:[]string(nil), SwigCXXFiles:[]string(nil), SysoFiles:[]string(nil), CgoCFLAGS:[]string
@shogo82148
shogo82148 / patch.diff
Created October 29, 2018 01:44
go-langserver.log
This file has been truncated, but you can view the full file.
startLoad &build.Package{Dir:"/usr/local/Cellar/go/1.11.1/libexec/src/net/url", Name:"url", ImportComment:"", Doc:"Package url parses URLs and implements query escaping.", ImportPath:"net/url", Root:"/usr/local/Cellar/go/1.11.1/libexec", SrcRoot:"/usr/local/Cellar/go/1.11.1/libexec/src", PkgRoot:"/usr/local/Cellar/go/1.11.1/libexec/pkg", PkgTargetRoot:"/usr/local/Cellar/go/1.11.1/libexec/pkg/darwin_amd64", BinDir:"/usr/local/Cellar/go/1.11.1/libexec/bin", Goroot:true, PkgObj:"/usr/local/Cellar/go/1.11.1/libexec/pkg/darwin_amd64/net/url.a", AllTags:[]string(nil), ConflictDir:"", BinaryOnly:false, GoFiles:[]string{"url.go"}, CgoFiles:[]string(nil), IgnoredGoFiles:[]string(nil), InvalidGoFiles:[]string(nil), CFiles:[]string(nil), CXXFiles:[]string(nil), MFiles:[]string(nil), HFiles:[]string(nil), FFiles:[]string(nil), SFiles:[]string(nil), SwigFiles:[]string(nil), SwigCXXFiles:[]string(nil), SysoFiles:[]string(nil), CgoCFLAGS:[]string(nil), CgoCPPFLAGS:[]string(nil), CgoCXXFLAGS:[]string(nil), CgoFFLAGS:[]string
@shogo82148
shogo82148 / cpu.svg
Created October 27, 2018 04:54
Profiles of go-langserver
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shogo82148
shogo82148 / console.txt
Created September 2, 2018 07:20
kagome build as wasm
wasm_exec.html:33 Console was cleared
wasm_exec.js:45 runtime: pointer 0x17e60000 to unused region of span span.base()=0x1377a000 span.limit=0x14779e00 span.state=1
wasm_exec.js:45 fatal error: found bad pointer in Go heap (incorrect use of unsafe or cgo?)
wasm_exec.js:45
runtime stack:
wasm_exec.js:45 runtime.throw(0x486db, 0x3e)
wasm_exec.js:45 /usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:608 +0x6 fp=0x36b6758 sp=0x36b6730 pc=0x11b20006
wasm_exec.js:45 runtime.findObject(0x17e60000, 0x0, 0x0, 0x0, 0x0, 0x0)
wasm_exec.js:45 /usr/local/Cellar/go/1.11/libexec/src/runtime/mbitmap.go:399 +0x42 fp=0x36b67a0 sp=0x36b6758 pc=0x10e30042
wasm_exec.js:45 runtime.wbBufFlush1(0xc010000)
//create.go
package gain
import (
"bufio"
"fmt"
"io"
)