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 fs from 'fs'; | |
import fetch from 'node-fetch'; | |
class Mapping { | |
id: string; | |
} | |
class AppDoubleMapper { | |
influxUrl = 'http://192.168.0.4:8086' | |
accessToken = fs.readFileSync('./influx access token.txt').toString(); |
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 http from 'http'; | |
import https from 'https'; | |
const httpAgent = new http.Agent({ keepAlive: true }); | |
const httpsAgent = new https.Agent({ keepAlive: true }); | |
const agent = (_parsedURL: URL) => _parsedURL.protocol == 'https:' ? httpsAgent : httpAgent; |
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
// ==UserScript== | |
// @name fast-torrent tool | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
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
https://hinst.ru | |
proxy /FogBugzBackup localhost:9000 | |
proxy /FogBugzBackupApi localhost:9000 | |
proxy /massd2d localhost:9001 | |
redir { | |
if {path} is / | |
/ /xyz |
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
ffmpeg -i input.mp4 -c:a copy -vn -sn output.m4a |
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
#!/bin/bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd $DIR | |
target="caddy" | |
path=$(realpath $target) | |
echo "$target control: $1" | |
if [ "$1" = "start" ] | |
then | |
nohup $path 2>>error-log.txt 1>>output-log.txt & |
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
package ho | |
import ( | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func InstallShutdownReceiver(receiver func()) { | |
c := make(chan os.Signal) |
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
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ |
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
func GetCallerName() string { | |
callers := make([]uintptr, 16) | |
runtime.Callers(3, callers) | |
f := runtime.FuncForPC(callers[0]) | |
return f.Name() | |
} |
NewerOlder