Skip to content

Instantly share code, notes, and snippets.

View Elschnagoo's full-sized avatar
🦉
NightOwl

Elschnagoo Elschnagoo

🦉
NightOwl
View GitHub Profile
@Elschnagoo
Elschnagoo / npm-proxy
Created October 12, 2025 16:02
Proxy Script for @aikidosec/safe-chain to used in Jetbrains IDE
#!/usr/bin/env zsh
# npm-proxy - A simple wrapper script to proxy all arguments to npm
# Optional: Log the command for debugging
echo "Running npm with arguments: $@" >&2
source ~/.safe-chain/scripts/init-posix.sh # Safe-chain Zsh initialization script
# Forward all arguments to npm
npm "$@"
@Elschnagoo
Elschnagoo / Semaphor.ts
Created July 28, 2022 02:37
Simple Typescript Semaphor / Mutex
import crypto from 'crypto';
export type SemElement = [string, (value: any | PromiseLike<any>) => void];
export class Semaphor {
private curQueue: Map<string, SemElement>;
private readonly max: number;
private callbackQueue: SemElement[];
@Elschnagoo
Elschnagoo / Main.kt
Last active October 18, 2021 21:58
SemperVideo
import java.io.File
import java.time.Duration
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
fun readFileAsLinesUsingBufferedReader(fileName: String): List<String>
= File(fileName).bufferedReader().readLines()
fun main(args: Array<String>) {
val path="" //PATH