Skip to content

Instantly share code, notes, and snippets.

View tsukumijima's full-sized avatar
📺
TTS & DTV

tsukumi tsukumijima

📺
TTS & DTV
View GitHub Profile
@monyone
monyone / MPEG2VIDEOをライブ再生したい.md
Created October 21, 2021 14:36
mpeg2video をライブ再生させたい

これは何?

Chrome M94 で追加された以下のAPIを使った TS (mpeg2video + aac) の再生実験

  • WebCodecs
  • Insertable Stream for MediaStreamTrack

mpeg2video のデコードは別途、mpeg2videoをデコードできる decoder_wasm を利用した.

@monyone
monyone / LIVE_FOR_WEBCODECS.md
Last active June 13, 2022 06:27
TSライブ再生実験 (used by Insertable Stream for MediaStreamTrack)

これは何?

Chrome M94 で追加された以下のAPIを使ったTSのライブ再生用デモ実装

  • WebCodecs
  • Insertable Stream for MediaStreamTrack

使い方

mpgets.js と同じような構成で (max_delay はリップシンクのため 0 推奨, データストリームは入れない事を推奨)

@contextnerror
contextnerror / TwitterRevertColoring.user.css
Last active September 1, 2021 23:21 — forked from tsukumijima/TwitterRevertColoring.user.css
Changes twitter UI to the old colors. By tsukumijima, modified to work on the English website.
/* ==UserStyle==
@name TwitterRevertColoring(English)
@description Changes twitter UI to the old colors. By tsukumijima, modified to work on the English website.
@namespace https://gist.github.com/contextnerror
@updateURL https://gist.githubusercontent.com/contextnerror/fd5f23560db92f41d15e40d84406c269/raw/TwitterRevertColoring.user.css
@author tsukumi
@version 1.3.6
@license MIT
==/UserStyle== */
// QuaStationのシリアル通信のコネクタにいつものM5のGROVEケーブルがぴったり。
// GROVEケーブルのツメを持ち上げて赤と黒を抜く、赤のところに黒をいれる。赤は入れないでテープで絶縁
// 改造したほうをQuaに指して、反対側はそのままM5StickCに。
// screen `ls -1 /dev/cu.usbserial-*` 115200
// https://lang-ship.com/blog/work/m5stickc-uartserial/
#include <M5StickC.h>
#define LED_BUILTIN 10
void setup() {
@Rendez
Rendez / pip.d.ts
Last active June 14, 2025 08:59
TypeScript types for the Picture-in-Picture feature of the Document and the video tag
interface PictureInPictureResizeEvent extends Event {
readonly target: PictureInPictureWindow;
}
interface PictureInPictureWindow {
readonly width: number;
readonly height: number;
onresize(this: PictureInPictureWindow, ev: PictureInPictureResizeEvent): void;
addEventListener(
type: 'resize',
@kai2nenobu
kai2nenobu / embed_jscript.ps1
Created March 23, 2021 02:28
JScriptにPowershellスクリプトを埋め込む
function // { # Define a nop function
param($nop)
{ // } > $null
return
}
// <# Call an embedded powershell from JScript
function escape(arg) {
return '"' + arg + '"';
}
@kawaz
kawaz / superInterval.js
Last active June 5, 2024 08:41
タブがバックグラウンドになってもサボらない setInterval
const superInterval = (cb, interval=1000, ...args) => {
try {
const code = `self.addEventListener('message', msg=>{setInterval(()=>self.postMessage(null), msg.data)})`
const w = new Worker(`data:text/javascript;base64,${btoa(code)}`)
w.onmessage = () => cb(...args)
w.postMessage(interval)
return {stop:()=>w.terminate()}
} catch(_){
// 実装の問題またはCSPによる拒否などで Worker が使えなければ普通の setInterval を使う
const id = setInterval(cb, interval, ...args)
@ZipFile
ZipFile / README.md
Last active May 9, 2025 17:09
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@voluntas
voluntas / webrtc_turn.rst
Last active April 4, 2025 02:27
WebRTC で利用されいる TURN プロトコルの解説

WebRTC で利用されいる TURN プロトコルの解説

日時:2021-01-29
作:@voluntas
バージョン:2021.2
url:https://voluntas.github.io/

@K0lb3
K0lb3 / Twitter Guest Search.py
Last active May 3, 2025 17:03
public Twitter search as json
import requests
import re
class Twitter:
def __init__(self):
self.s = requests.Session()
self.get_tokens()
def get_tokens(self):