Skip to content

Instantly share code, notes, and snippets.

@Jxck
Jxck / 2015-min.png
Last active November 14, 2023 16:16
次世代 Web カンファレンス
2015-min.png

some pain point for building podcast over pwa.

1. DOMParser from SW

sw can't access to DOM API it includes DOMParser API too. so it neccessary for import extra xml feed parser in sw. it reasonable for me that sw can't access to window dom tree but if DOMParser is indepened from tree, I wish I can use them.

in my case, I serve feed xml by myself, so I export json version of feed.

@Jxck
Jxck / このラジオがやばい2019.md
Last active January 8, 2020 03:01
#このラジオがヤバい Advent Calendar 2019 - Adventar (https://adventar.org/calendars/4913) の初日です

このラジオがやばい 2019

Intro

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

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

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

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 08:21
OpenSSL DTLS API

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 オブジェクトの生成とタイマのために追加でいくつか必要。

Verifying that +jxck is my blockchain ID. https://onename.com/jxck
@Jxck
Jxck / example.com.h2.har.json
Last active August 21, 2018 11:02
h2 supported json proposal
{
"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 July 2, 2015 03:05
Promise.chain()
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 November 17, 2022 20:34
gocon 2014
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 August 29, 2015 13:57
Go Kyoto(Go勉強会 そうだ京都、行こう) のハンズオン資料 (http://www.zusaar.com/event/4367004)