This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BlobReader { | |
public static toBytes = (ab: ArrayBuffer) => new Uint8Array(ab); | |
public static EOF = new Error('EOF'); | |
public static LOCK = new Error('LOCK'); | |
private _remain!: Blob; | |
private _offset = 0; | |
private _end = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function exitWithErr(...args) { | |
console.error('error:', ...args); | |
process.exit(-1); | |
} | |
let roomId = process.argv[2]; | |
if (!roomId) exitWithErr('please provide roomId'); | |
const DEBUG = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const rl = require('readline').createInterface({ | |
input: process.stdin, | |
output: process.stdout, | |
terminal: false, | |
}); | |
const data = []; | |
rl.on('line', (line) => { | |
data.push(line); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Bittorrent Tracker | |
[Service] | |
ExecStart=bittorrent-tracker -qsp 6969 | |
Restart=always | |
RestartSec=10 | |
StandardOutput=syslog | |
StandardError=syslog | |
SyslogIdentifier=bittorrent-tracker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<PremiereData Version="3"> | |
<Tree ObjectRef="1"/> | |
<Tree ObjectID="1" ClassID="177f2841-dd5b-43bd-9d9a-79e231bd47dd" Version="1"> | |
<RootBin ObjectRef="2"/> | |
<Node Version="1"> | |
</Node> | |
</Tree> | |
<BinTreeItem ObjectID="2" ClassID="5e0f46fa-384f-4c09-bc53-0b8e2b7005b5" Version="4"> | |
<TreeItemBase Version="4"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ytbdl() { | |
until youtube-dl $@; | |
} | |
# usage: | |
# $ ytbdl [...targets] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extra-keys = [ \ | |
[ \ | |
{ key: ESC, popup: '&' }, \ | |
{ key: '/', popup: '~' }, \ | |
{ key: '-', popup: '|' }, \ | |
{ key: HOME, popup: '[' }, \ | |
{ key: UP, popup: ':' }, \ | |
{ key: END, popup: ']' }, \ | |
{ key: PGUP, popup: '&' } \ | |
], \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
play_youtube() { | |
G=(`youtube-dl -g $1`) | |
echo ${G[1]} | |
echo ${G[2]} | |
ffmpeg -i ${G[1]} -i ${G[2]} -c:v copy -c:a copy -f matroska - | ffplay - | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Brainfuck VM */ | |
class BFVM { | |
static ParseError = class extends Error { | |
constructor() { | |
super('parse error'); | |
} | |
}; | |
static PtrOutOfRangeError = class extends Error { | |
constructor() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"image" | |
"image/draw" | |
"image/png" | |
"math/rand" | |
"os" | |
"runtime" |