Skip to content

Instantly share code, notes, and snippets.

View izelnakri's full-sized avatar
🇺🇦
Ember.js is the best.

Izel Nakri | izelnakri.eth izelnakri

🇺🇦
Ember.js is the best.
View GitHub Profile
@izelnakri
izelnakri / gist:5a7f25ab01940f915b01754585ddeac1
Created April 13, 2026 08:40
Major Node.js BUG: process management/children resources
ME: Seems like in node.js process/child management is complex and broken api design/intuition-wise, am I correct with this assessment? Seems like we do all these hacks just to patch
what node.js should have done properly under the hood?
● Partially correct, but the blame is split between Node.js and the OS. Let me be precise about each layer:
Where the complexity is genuinely Node.js's fault:
- detached: true is poorly named and documented. It actually means "create a new process group" — a Unix kernel concept — but the name implies "run independently". Most
developers have no idea it controls the PGID.
- proc.kill() only kills the process you spawned, not its children. Node could have set prctl(PR_SET_PDEATHSIG, SIGKILL) on every spawned child by default (Linux), which would
@izelnakri
izelnakri / flake.nix
Last active August 19, 2025 15:24
NixOS/nixpkgs Testing Conventions. The most advanced tutorial on the internet!
{
description = "Example advanced flake.nix for an advanced/general-purpose software package";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
@izelnakri
izelnakri / flake.nix
Created August 11, 2025 05:30
Advanced multi node test/dev infrastructure on nix
{
description = "Advanced flake.nix for nix based development environment";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
# Initial Scene setup:
# Main
# - WorldEnvironment
# - Node3d (which has this script attached)
# -- XROrigin3D
# --- OpenXRFbSceneManager (has Default Scene of static-body-3d.gd with Scene Setup: `setup_scene`)
# --- XRCamera3D
# --- XRController3D (Left)
# --- XRController3D (Right)
@izelnakri
izelnakri / flake.nix
Created July 4, 2025 09:41
OneAPI whisper.cpp ongoing in-development build process
# OneAPI whisper.cpp ongoing in-development build process
# devShell works(with FHS), `$ nix run .` doesn't work yet, needs OneAPI on nixpkgs/derivation.
{
description = "Development environment for whisper.cpp with Intel compilers and SYCL";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
@izelnakri
izelnakri / bitbox-bridge.nix
Last active March 10, 2025 09:32
flake.nix - Most universal template for any software project
# Example of a binary packaging(storing a frozen binary with deps WITH compiler build) in nix:
# $ nix run --impure --expr 'let pkgs = import <nixpkgs> {}; in pkgs.callPackage ./bitbox-bridge.nix {}'
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
pkg-config,
libudev-zero,
}:
@izelnakri
izelnakri / pcall.js
Last active February 26, 2025 01:56
Pcall.js Lua pcall in JavaScript
async function exampleFunc(greeter?: string, another): Promise<string> {
if (!greeter) {
throw new Error('Somethinggg', another);
}
return `Hello, ${greeter} ${another}`;
}
let pcall = (func: Promise<Any> | Function, ...otherArguments: any) => {
if (func instanceof Promise) {
@izelnakri
izelnakri / AndroidActions.txt
Last active February 6, 2025 21:20 — forked from zr0n/AndroidActions.txt
List of Android Actions
/** Find all Activity of an app **/
adb shell dumpsys package | grep -i "package.name" | grep Activity
/** Service Actions **/
android.app.action.DEVICE_ADMIN_SERVICE
android.intent.action.RESOLVE_INSTANT_APP_PACKAGE
android.intent.action.RESPOND_VIA_MESSAGE
android.intent.action.TTS_SERVICE
android.media.browse.MediaBrowserService
@izelnakri
izelnakri / keyboard.sh
Last active November 16, 2024 22:48
How to share laptop keyboard and trackpad with the VR headset
#!/bin/bash
DEVICE_IDENTIFIER="adb-RFCW7028MXJ-JZpS3e" # Phone
# DEVICE_IDENTIFIER="adb-2G0YC5ZG2001JS" # VR headset
FALLBACK_HOSTNAME="Android.local"
FOUND_DEVICE=$(avahi-browse --all --resolve --terminate -p | grep 'IPv4' | grep "$DEVICE_IDENTIFIER" | grep '=;')
echo "DEVICE IS:"
@izelnakri
izelnakri / AdbCommands
Last active September 28, 2025 18:06 — forked from Pulimet/AdbCommands
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
Current viewed activity: