Skip to content

Instantly share code, notes, and snippets.

Jxck Jxck

Block or report user

Report or block Jxck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Jxck
Jxck / dtls_api.md
Created May 24, 2016
OpenSSL DTLS API
View dtls_api.md

OpenSSL DTLS API

The API used for DTLS is mostly the same as for TLS, because of the mapping of generic functions to protocol specifc ones. Some additional functions are still necessary, because of the new BIO objects and the timer handling for handshake messages. The generic concept of the API is described in the following sections. Examples of applications using DTLS are available at [9].

DTLS の API は TLS とほぼ同じ。 BIO オブジェクトの生成とタイマのために追加でいくつか必要。

View blockchain
Verifying that +jxck is my blockchain ID. https://onename.com/jxck
@Jxck
Jxck / example.com.h2.har.json
Last active Aug 21, 2018
h2 supported json proposal
View example.com.h2.har.json
{
"log": {
"version": "1.x",
"creator": { },
"pages": [
{
"startedDateTime": "2015-07-14T00:43:05.821Z",
"id": "page_1",
"title": "https://example.com/",
"pageTimings": { }
@Jxck
Jxck / chain.js
Created Jul 2, 2015
Promise.chain()
View chain.js
new Promise(function (resolve) {
var pp = new Promise(function(r) {
setTimeout(function() {
r('aa');
}, 100);
});
setTimeout(function() {
resolve(pp);
}, 100);
@Jxck
Jxck / rob.go
Last active Jun 30, 2018
gocon 2014
View rob.go
type errWriter struct {
w io.Writer
err error
}
func (e *errWriter) Write(p []byte) {
if e.err != nil {
return
}
_, e.err = e.w.Write(p)
@Jxck
Jxck / README.md
Last active Aug 29, 2015
Go Kyoto(Go勉強会 そうだ京都、行こう) のハンズオン資料 (http://www.zusaar.com/event/4367004)
View README.md
@Jxck
Jxck / benchmark.md
Last active Aug 29, 2015
benchmark of Generator in Go using Channel & Closure
View benchmark.md

on Mac Book Air (OSX 10.7.5) 1.6 GHz Intel Core i5 Memory 4GB

$ go test -bench .
PASS
BenchmarkClosure        100000000    11.5 ns/op
BenchmarkMutexClosure   50000000     35.3 ns/op
BenchmarkAtomicClosure  100000000    17.8 ns/op
@Jxck
Jxck / map.go
Created Feb 9, 2014
Not Atomic operation on Map
View map.go
package main
import (
"log"
"runtime"
"sync"
)
var debug func(a ...interface{})
@Jxck
Jxck / a.txt
Last active Jan 26, 2017
ジェネレータの解説と非同期への適用 完成品 http://jxck.hatenablog.com/entry/2014-01-12/generator-screencaset
@Jxck
Jxck / generator.js
Created Jan 11, 2014
next() の挙動がよくわからない。
View generator.js
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));
You can’t perform that action at this time.