Skip to content

Instantly share code, notes, and snippets.

function ytbdl() {
until youtube-dl $@;
}
# usage:
# $ ytbdl [...targets]
extra-keys = [ \
[ \
{ key: ESC, popup: '&' }, \
{ key: '/', popup: '~' }, \
{ key: '-', popup: '|' }, \
{ key: HOME, popup: '[' }, \
{ key: UP, popup: ':' }, \
{ key: END, popup: ']' }, \
{ key: PGUP, popup: '&' } \
], \
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 -
}
/** Brainfuck VM */
class BFVM {
static ParseError = class extends Error {
constructor() {
super('parse error');
}
};
static PtrOutOfRangeError = class extends Error {
constructor() {
package main
import (
"fmt"
"image"
"image/draw"
"image/png"
"math/rand"
"os"
"runtime"
const random = (c, b = 256) => [...Array(c)].map(() => ~~(Math.random() * b));
[
{
"__type__": "cc.Prefab",
"_name": "",
"_objFlags": 0,
"_native": "",
"data": {
"__id__": 1
},
"optimizationPolicy": 0,
function isArrowFunction(f) { return typeof f === 'function' && typeof f.prototype === 'undefined' }
var Mode;
(function (Mode) {
Mode[(Mode['Pad'] = 0)] = 'Pad';
Mode[(Mode['Bool'] = 1)] = 'Bool';
Mode[(Mode['Byte'] = 2)] = 'Byte';
Mode[(Mode['U_Byte'] = 3)] = 'U_Byte';
Mode[(Mode['Word'] = 4)] = 'Word';
Mode[(Mode['U_Word'] = 5)] = 'U_Word';
Mode[(Mode['DWord'] = 6)] = 'DWord';
Mode[(Mode['U_DWord'] = 7)] = 'U_DWord';
const Primitives = {
uint8: Uint8Array,
uint16: Uint16Array,
uint32: Uint32Array,
int8: Int8Array,
int16: Int16Array,
int32: Int32Array,
float32: Float32Array,
float64: Float64Array,
};