$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices server.c -o server
$ gcc -g -Wall -I /path/to/libuv/include /path/to/libuv/uv.a -framework CoreServices client.c -o client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func padding(str string) string { | |
return strings.Repeat("0", 8 - len(str)) + str | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
Tokyo, Japan January 30-February 1, 2013
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
/* | |
Go のインタフェース設計 | |
参考 | |
https://code.google.com/p/go-wiki/wiki/GoForCPPProgrammers | |
http://jordanorelli.tumblr.com/post/32665860244/how-to-use-interfaces-in-go | |
http://research.swtch.com/interfaces | |
http://www.airs.com/blog/archives/277 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
全て Without Indexing で送るパターン | |
HT を更新しない。 | |
結果的には :scheme, :method くらいしか使いまわさないパターン。 | |
[1] | |
HeaderSet | |
:scheme: https | |
:host: jxck.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, socket | |
''' | |
tcp fast open server sample code | |
execute it before enable tfo flag | |
$ echo 3 | sudo tee /proc/sys/net/ipv4/tcp_fastopen | |
''' | |
PORT = 80 | |
MSG_FASTOPEN = 0x20000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function* generator() { | |
console.log(yield 1); | |
console.log(yield 2); | |
console.log(yield 3); | |
return 4; | |
} | |
var g = generator(); | |
console.log(g.next(0)); // この 0 を取る方法は? | |
console.log(g.next(10)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b.txt |