This file contains 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 Configs extends DataFrame<Config[]> { | |
constructor() { | |
super({autoFetch: true}); | |
} | |
protected async fetch(): Promise<Config[]> { | |
return fetch(`/config/list`) | |
} | |
} | |
This file contains 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
import React, {useEffect, useRef, useState} from 'react' | |
type ProviderChildren<Store extends new (...args: any[]) => InstanceType<Store>> = | |
| { children: React.ReactNode } | |
| { children: React.ReactNode, staticStore: InstanceType<Store> } | |
| { children: React.ReactNode, arguments: ConstructorParameters<Store> } | |
type Lifecycle<S extends new (...args: any[]) => InstanceType<S>> = { | |
init?: (instance: InstanceType<S>) => void |
This file contains 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
export function find(hayStack: any, magnifier: (path: string[], key: string, value: any) => boolean) { | |
const foundPaths: { path: string[], key: string, value: unknown }[] = []; | |
function walk(obj: any, path: string[]) { | |
// console.log(path.join('.'), obj) | |
if (magnifier(path, path[path.length - 1], obj)) { | |
foundPaths.push({ | |
path: path.slice(0, path.length - 1), |
This file contains 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 bc = require('beamcoder'); | |
bc.demuxer('rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov').then(dm => console.log(dm.duration)) |
This file contains 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 { app, BrowserWindow, dialog} = require('electron'); | |
app.on('ready', async () => { | |
const mainWindow = new BrowserWindow({ | |
center: true, | |
autoHideMenuBar: true, | |
webPreferences: { | |
nodeIntegration: true, | |
contextIsolation: false, |
This file contains 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
// C:\Users\Stefan\AppData\Local\Packages\Microsoft.Lovika_8wekyb3d8bbwe\LocalCache\Local\Dungeons | |
const fs = require('fs'); | |
const path = require('path'); | |
const assert = require('assert'); | |
const [toWatch, toBackup] = process.argv.slice(2); | |
assert(fs.existsSync(toWatch), `cannot find dir ${toWatch}`); | |
assert(fs.existsSync(toBackup), `cannot find backup dir ${toBackup}`); |
This file contains 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
[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing.Bitmap") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing.Graphics") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing.Imaging") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing.Icon") | |
[Reflection.Assembly]::LoadWithPartialName("System.IO") | |
function Img2Icon{ | |
param ($image) | |
This file contains 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
{ | |
"targets": [ | |
{ | |
"target_name": "napi-testing", | |
'include_dirs': [ | |
"<!@(node -p \"require('node-addon-api').include\")", | |
"src", | |
"/usr/local/include", | |
"/usr/local/tensorflow/include/" | |
], |
This file contains 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
{ | |
"name": "example", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", | |
"scripts": {}, | |
"author": "Stefan-Gabriel Muscalu <stefan.gabriel.muscalu@gmail.com> (http://my.corneroftheinternet.rocks/)", | |
"dependencies": { | |
"darknet-bindings": "git+ssh://git@github.com/legraphista/darknet-bindings.git#9d61036a1f8282ff870481a0079e31c1dc6f45d4", | |
"expose-gc": "^1.0.0" |
This file contains 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 async_hooks = require('async_hooks'); | |
let indent = 0; | |
const fs = require('fs'); | |
const map = new Map(); | |
async_hooks.createHook({ | |
init(asyncId, type, triggerAsyncId, resource) { | |
const eid = async_hooks.executionAsyncId(); | |
const indentStr = ' '.repeat(indent); | |
fs.writeSync( |
NewerOlder