Skip to content

Instantly share code, notes, and snippets.

Avatar

Koushik Dutta koush

View GitHub Profile
View test.js
const fs = require('fs');
var f = fs.readFileSync('test.ts')
var offset = 0
var pids = {}
// var fout = fs.openSync("check-trim.ts", "w")
var incompleteTypes = {
video: 0,
View test.js
const fs = require('fs');
var f = fs.readFileSync('check.ts')
var offset = 0
var pids = {}
// var fout = fs.openSync("check-trim.ts", "w")
var incompleteTypes = {
video: 0,
View test.js
const fs = require('fs');
var f = fs.readFileSync('check.ts')
var offset = 0
var pids = {}
// var fout = fs.openSync("check-trim.ts", "w")
var incompleteTypes = {
video: 0,
View require.js
import * as std from 'std';
import * as os from 'os';
function getCallingScript(depth) {
depth = depth || 0;
try {
throw new Error();
}
catch (e) {
try {
View test.js
function foo1() {
throw new Error();
}
function foo2() {
try {
foo1();
}
finally {
}
View test.js
function foo1() {
throw new Error();
}
function foo2() {
try {
foo1();
}
catch (e) {
throw e;
View quickjs.arraybuffer.c
JS_BOOL JS_IsArrayBuffer(JSValueConst v)
{
JSObject *p;
if (JS_VALUE_GET_TAG(v) != JS_TAG_OBJECT)
return FALSE;
p = JS_VALUE_GET_OBJ(v);
if (p->class_id != JS_CLASS_ARRAY_BUFFER &&
p->class_id != JS_CLASS_SHARED_ARRAY_BUFFER) {
return FALSE;
}
View du.txt
Mac:work$ du -h node_modules/kotlin/
4.0K node_modules/kotlin//kotlin/org/w3c/css/masking
4.0K node_modules/kotlin//kotlin/org/w3c/css
4.0K node_modules/kotlin//kotlin/org/w3c/xhr
4.0K node_modules/kotlin//kotlin/org/w3c/fetch
4.0K node_modules/kotlin//kotlin/org/w3c/files
16K node_modules/kotlin//kotlin/org/w3c/dom/svg
12K node_modules/kotlin//kotlin/org/w3c/dom/css
4.0K node_modules/kotlin//kotlin/org/w3c/dom/url
4.0K node_modules/kotlin//kotlin/org/w3c/dom/pointerevents
View app.js
require('http').createServer(
(req, res) => require('child_process').spawn('/usr/local/bin/ffmpeg', [
'-i',
'rtsp://192.168.2.11:7447/fXbuD6HqIV9y8BKL',
'-vcodec',
'copy',
'-f',
'mpegts',
'pipe:1',
]).stdout.pipe(res)
View plugin.js
let currentTypes = null;
function wrapWithTypes (types, fn) {
return function (...args) {
const oldTypes = currentTypes;
currentTypes = types;
try {
return fn.apply(this, args);
} finally {
currentTypes = oldTypes;