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 / このラジオがやばい2019.md
Last active Jan 8, 2020
#このラジオがヤバい Advent Calendar 2019 - Adventar (https://adventar.org/calendars/4913) の初日です
View このラジオがやばい2019.md

このラジオがやばい 2019

Intro

radiko やラジオクラウドの普及もあってか、最近ラジオが以前より盛り上がっているような気がしている。

ラジフェスも嘘か本当か集客がすごいらしく(そんないたか?)、来年ついに 万博 になって今から楽しみだ。

普段会話の中になかなか出てこないけど、今年は意外とリスナーが近くにいることに気づけた年でもあった。

View eventtarget.d.ts
declare global {
// EventTarget に on を生やすと addEventListener を on と書ける
// e.g. ws.on('message', ()=>{})
interface EventTarget {
on: typeof EventTarget.prototype.addEventListener;
}
}
WebSocket.prototype.on = WebSocket.prototype.addEventListener
@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{})
You can’t perform that action at this time.