Skip to content

Instantly share code, notes, and snippets.

@eladkarako
eladkarako / really speed up windows 11 virtual machines in vmware workstation.md
Last active September 26, 2026 06:52
really speed up windows 11 virtual machines in vmware workstation

pre-setup - creating the machine

  1. make a recent version ISO using https://uupdump.net/

  2. choose Windows 10 scheme, install Windows 11 on top of it. with Windows 10 scheme (the OS selection window) you don't get forced to set tpm, nor to encrypt the hd.

  3. (direct continue 1. ) avoid encrypting the hd or any files, remove tpm component.

  4. sound and network can be set disabled as well as not to auto enable on boot. do that.

@eladkarako
eladkarako / uninstalling and reinstalling rust on wsl (ubuntu linux core).md
Last active September 24, 2026 02:34
uninstalling and reinstalling rust on wsl (ubuntu linux core)

Confirm you are using Linux Rust

type -a rustup
type -a rustc
type -a cargo

if you see /mnt/c/Users or commands ending in .exe,
you are using the Windows installation from WSL.

@eladkarako
eladkarako / clock_analog.svg
Last active September 23, 2026 20:12
clock_analog.svg - smooth animation real-time analog clock with 60 ticks 12 thicker ticks, hours, minutes, and jumpy seconds hands, single time javascript initiates the current time, but everything is inline. so it can be embedded
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eladkarako
eladkarako / JSON.stringify written in pure javascript. inline-worker, bytes array.js
Last active September 23, 2026 18:38
JSON.stringify written in pure javascript. inline-worker, bytes array.
/**
* Worker-based JSON serializer.
*
* @fileoverview
* Serializes JavaScript values to UTF-8 JSON bytes in an inline Web Worker.
*
* @const {Object}
*/
const default_options = Object.freeze({
detect_circular_references: true,
@eladkarako
eladkarako / index.js
Last active September 17, 2026 18:37
nodejs workers for multi-threaded work
"use strict";
const paths = process.argv.slice(2) //actual array of arguments.callee
,n_paths = paths.length //amount of arguments
,n_cpus = Math.max(1, require("os").availableParallelism() - 1) //require("os").cpus().length //maximum amount of parallel jobs, good practice is to keep 1 CPU free.
,n_workers = Math.max(1, Math.min(n_paths || 1, n_cpus)) //amount of array to generate from 1 to top-capped by amount of CPUs, unless there are less arguments than CPUs in which case choose exact amount by amount of arguments.
,n_ratio = n_paths / n_workers //float. represents the average number of input items per job. fractional value is important. It preserves the information about where the extra items should be placed.
,workers_data = new Array(n_workers) //pre-allocate empty array for array of a
@eladkarako
eladkarako / logic of re-distributing an array, based on amount of CPUs available in system, for maximum usage of worker per CPU - javascript nodejs.js
Last active September 17, 2026 14:07
logic of re-distributing an array, based on amount of CPUs available in system, for maximum usage of worker per CPU - javascript nodejs
"use strict";
const args = process.argv.slice(2) //actual array of arguments.callee
,n_args = args.length //amount of arguments
,n_cpus = Math.max(1, require("os").availableParallelism() - 1); //require("os").cpus().length //maximum amount of parallel jobs, good practice is to keep 1 CPU free.
,n_arrays = Math.max(1, Math.min(n_args || 1, n_cpus)) //amount of array to generate from 1 to top-capped by amount of CPUs, unless there are less arguments than CPUs in which case choose exact amount by amount of arguments.
,n_ratio = n_args / n_arrays //float. represents the average number of input items per job. fractional value is important. It preserves the information about where the extra items should be placed.
,jobs = new Array(n_arrays) //pre-allocate empty array for array of arrays.
;
@eladkarako
eladkarako / ffmpeg__intel_hardware__gpu_decode__gpu_encode__h264_aac__output_folder.cmd
Last active September 14, 2026 14:45
ffmpeg intel hardware decoding and intel hardware encoding (h264 aac) into output folder
::@echo off
chcp 65001 1>nul 2>nul
goto LOOP
::-----------------------------------------------------------------
:PROCEDURE_FILE
setlocal
::---------------------------------------
@eladkarako
eladkarako / ffmpeg - making audio louder by normalization.md
Created September 13, 2026 12:03
ffmpeg - making audio louder by normalization
  • -af "loudnorm=I=-16:TP=-1.5:LRA=30"
  • -af "loudnorm=I=-16:TP=-1.5:LRA=10"
  • -af "loudnorm=I=-16:TP=-1.5:LRA=5"

All three target roughly the same overall loudness and peak level:

  • Integrated loudness: -16 LUFS
  • True peak: -1.5 dBTP

The difference is the target loudness range (LRA):

@eladkarako
eladkarako / Edge Browser Policy Installation And Usage (gpedit.msc and registry) including example for custom DNS-over-HTTPS cloudflare, and 30 seconds discarding background tabs.md
Last active September 12, 2026 22:12
Edge Browser Policy Installation And Usage (gpedit.msc and registry) including example for custom DNS-over-HTTPS cloudflare, and 30 seconds discarding background tabs

@eladkarako
eladkarako / avoiding using observer for simple cases by hooking and piggyback creation method and get-set descriptors.js
Created September 11, 2026 17:47
avoiding using observer for simple cases by hooking and piggyback creation method and get-set descriptors
/*
running the code, as content script in a web-extension at "document_start"
will probably be better than running timer/loop of discovering elements from DOM,
or having mutation observer listener(s).
this example makes sure all suitable elements are lazyloading
(I also added crossdomain for selected few).
-----------------------------------------------------