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
function bigIntToBuffer(num: bigint, endian: 'be' | 'le') { | |
const bytes: number[] = []; | |
while (num > 0) { | |
bytes.push(Number(num & 0xffn)); | |
num = num >> 8n; | |
} | |
return Buffer.from(endian === 'be' ? bytes.reverse() : bytes); | |
} | |
function bufferToBigInt(bytes: Buffer, endian: 'be' | 'le') { |
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
@ECHO off | |
SETLOCAL enableextensions enabledelayedexpansion | |
CD /D "%~dp0" | |
SET BASEPATH=%~dp0 | |
REM =============================[CONFIG START]============================= | |
SET STEAMCMDPATH=.steamcmd | |
REM Steam login details, you may need to run this twice if you have Auth Guard enabled (which you should) |
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 { readFileSync } from 'fs'; | |
import { parse } from 'protobufjs'; | |
if (!process.argv[2]) throw new Error('no arg'); | |
const file = readFileSync(process.argv[2]); | |
if (!file) throw new Error('no file'); | |
const root = parse(` | |
package chromeextensionid; |
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
using System; | |
using System.Collections.Generic; | |
using System.Windows; | |
using Caliburn.Micro; | |
using Ninject; | |
namespace Maca134.Stuff | |
{ | |
internal abstract class NinjectBootstrapper<TViewModel> : BootstrapperBase | |
{ |
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 { Readable, Writable } from "stream"; | |
import { commandOptions, createClient } from "redis"; | |
export const createWriteStream = (client: ReturnType<typeof createClient>, key: string, opts?: { ttlMs?: number }) => | |
new Writable({ | |
objectMode: false, | |
construct: (callback) => | |
client | |
.del(key) | |
.then(() => callback()) |
OlderNewer