Skip to content

Instantly share code, notes, and snippets.

@nus
nus / docker-compose.yaml
Created September 10, 2020 16:46
Gitlab をローカルに立てるための docker-compose ファイル。https://qiita.com/gentaro/items/7dec88e663f59b472de6 を改変。
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'localhost'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://localhost:9010'
gitlab_rails['gitlab_shell_ssh_port'] = 2022
ports:
- '9010:9010'
https://tools.ietf.org/pdf/draft-jennings-rtcweb-deps-23.pdf
トラックすることを助ける、IETFが依存している、W3C WebRTC ドキュメントから。
# IETFのキーとなるドラフト
1. [I-D.ietf-ice-trickle]
"Trickle ICE: Incremental Provisioning of Candidates for the Interactive Connectivity Establishment (ICE) Protocol"
https://tools.ietf.org/pdf/draft-ietf-ice-trickle-21.pdf
2. [I-D.ietf-mmusic-rid]
"RTP Payload Format Restrictions"
@nus
nus / Win10pcapcodereading.md
Last active July 23, 2019 14:55
Windows のパケットキャプチャ方法

Win10Pcap コードリーディング

Win10Pcap は、 WinPcap ライブラリの API を Windows 10 向けに提供するドライバ・ライブラリ。ライセンスは、 GPL 。

Win10Pcap の構成。

Windows<--Driver Inteface-->NdisDriver<--Event-->NdisDriverUser<--Function Call-->Packet32
@nus
nus / main.cpp
Last active October 3, 2023 15:03
An example of emscripten with WebSocket.
// $ em++ -lwebsocket.js -o index.html main.cpp
#include <emscripten/emscripten.h>
#include <emscripten/websocket.h>
#include <stdio.h>
EM_BOOL onopen(int eventType, const EmscriptenWebSocketOpenEvent *websocketEvent, void *userData) {
puts("onopen");
EMSCRIPTEN_RESULT result;
@nus
nus / gist:4146d9800e458c627b90fdc31e2f0cb8
Created April 14, 2019 05:23
ffmpeg で gif アニメに変換する方法
.\ffmpeg.exe -i src.mp4 -vf scale=260:-1 -r 3 dst.gif
幅260 ピクセル、フレームレート3で src.mp3をdst.gif に変換する。
参考
https://qiita.com/wMETAw/items/fdb754022aec1da88e6e
@nus
nus / gke-memo.md
Last active January 15, 2019 16:59
Google Kubernetes Engine のメモ

Kubernetes のクラスタを作るコマンド

gcloud container clusters create my-cluster --zone asia-northeast1-a --machine-type n1-standard-1 --num-nodes 3

Kubernetes のクラスタを破棄するコマンド

gcloud container clusters delete my-cluster --zone asia-northeast1-a

package com.example.urgcapturer
import android.content.Context
import android.hardware.usb.UsbManager
import android.util.Log
import com.hoho.android.usbserial.driver.CdcAcmSerialDriver
import com.hoho.android.usbserial.driver.ProbeTable
import com.hoho.android.usbserial.driver.UsbSerialPort
import com.hoho.android.usbserial.driver.UsbSerialProber
import com.kristou.urgLibJ.Connection.Connection
@nus
nus / janus_hoge.patch
Last active January 22, 2018 14:36
Janus で、Hogeプラグインを書くためのパッチ。d01b9ade585b11549a073672bc4b602cb80b6404 時点。
diff --git a/Makefile.am b/Makefile.am
index e477788..e050ed0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -429,6 +429,16 @@ conf_DATA += conf/janus.plugin.textroom.cfg.sample
EXTRA_DIST += conf/janus.plugin.textroom.cfg.sample
endif
+if ENABLE_PLUGIN_HOGE
+plugin_LTLIBRARIES += plugins/libjanus_hoge.la
@nus
nus / quiqc.cc
Last active November 19, 2017 14:53
Quic memo. バックアップ用とのため実装は中途半端。https://github.com/google/proto-quic 1694fa55a19d7e03103f65d69360bd7ff05389c8
#include "base/at_exit.h"
#include "base/message_loop/message_loop.h"
#include "base/threading/thread_task_runner_handle.h"
#include "net/cert/cert_verifier.h"
#include "net/cert/ct_known_logs.h"
#include "net/cert/ct_policy_enforcer.h"
#include "net/cert/multi_log_ct_verifier.h"
#include "net/http/transport_security_state.h"
#include "net/tools/quic/quic_client_base.h"
#include "net/tools/quic/quic_client_message_loop_network_helper.h"
@nus
nus / WebRTC-memo.md
Last active May 21, 2017 14:42
WebRTCメモ

WebRTC

Native APIs

https://webrtc.org/native-code/native-apis/

WebRTC のスレッドモデル

グローバル領域に2つのスレッドが存在する

  • signaling thread
  • コールバックを呼び出すスレッド