Skip to content

Instantly share code, notes, and snippets.

@KarimAziev
KarimAziev / curtain.scad
Created November 29, 2025 08:09
Curtain #scad
$fn=360;
screw_dia = 9.2;
upper_height = 37;
upper_dia_1 = 25.38;
upper_dia_2 = 30.6;
lower_height = 10;
lower_dia_2 = 52.15;
lower_dia_1 = 51.8;
@KarimAziev
KarimAziev / linux-scan-local-subnet.sh
Last active November 18, 2025 08:53
Detects the default interface and its IPv4/netmask, computes the subnet in CIDR form, then runs sudo nmap -sn on that subnet to discover live hosts - producing a list of reachable IPs (with hostnames and MAC addresses when available). #sh #macos #linux
# Detect default interface and run sudo nmap -sn on the local IPv4 subnet (CIDR)
sudo nmap -sn $(ip -4 route list match $(ip -o -4 addr show dev $(ip route get 8.8.8.8 2> /dev/null | awk '{for(i=1;i<NF;i++) if($i=="dev"){print $(i+1); exit}}') | awk '{print $4}') | awk '{print $1}')
@KarimAziev
KarimAziev / emacs_unfreeze.sh
Created November 14, 2025 08:36
Sending SIGUSR2 to the Emacs process forces Emacs to break out of a freeze and display a backtrace. It doesn't kill the editor - instead it triggers Emacs' built-in debug-on-event handler, which unblocks the stuck event loop and makes the UI responsive again. #sh
pkill -SIGUSR2 Emacs-real
@KarimAziev
KarimAziev / osx-for-hackers.sh
Created November 11, 2025 10:27 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@KarimAziev
KarimAziev / picamera2-manual.md
Last active December 30, 2025 20:07
I converted the Picamera 2 PDF manual (2025-03) to Markdown because, apparently, the Raspberry Pi Foundation couldn't be bothered to provide one. #md
@KarimAziev
KarimAziev / build_openscad.sh
Created July 17, 2025 06:56
Build Openscad #sh
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
set -e
set -o pipefail
git clone [email protected]:openscad/openscad.git
cd openscad
@KarimAziev
KarimAziev / firefox-frustration.txt
Created July 13, 2025 14:27
Firefox Frustration #txt
I have to say - as the developer of such "insecure" extension (Chrome-Emacs), I'm baffled by this "insecure” label. Every time I update my add-on, I submit the full source code and detailed instructions, yet it seems that no one ever really looks at what I provide. It feels like my work is automatically dismissed, and I'm being penalized just because it didn't go through some manual review process I can't even influence.
What exactly does "actively monitored” mean? If my extension were truly dangerous, this would be highlighted with concrete evidence or specific criteria. Instead, it simply gets tagged with a warning that nothing more is expected from me. It's hard not to feel brushed aside by a process that appears to rely more on automated checks than genuine security evaluations.
I'm all for keeping users safe, but by lumping all non-"Recommended” extensions into the same category, it feels like you're ignoring the effort and transparency many developers like me put into our work. Clear guidance on how to
@KarimAziev
KarimAziev / firefox-frustration.txt
Created July 13, 2025 14:24
Firefox Frustration #txt
I have to say - as the developer of such "insecure" extension (Chrome-Emacs), I'm baffled by this "insecure” label. Every time I update my add-on, I submit the full source code and detailed instructions, yet it seems that no one ever really looks at what I provide. It feels like my work is automatically dismissed, and I'm being penalized just because it didn't go through some manual review process I can't even influence.
What exactly does "actively monitored” mean? If my extension were truly dangerous, this would be highlighted with concrete evidence or specific criteria. Instead, it simply gets tagged with a warning that nothing more is expected from me. It's hard not to feel brushed aside by a process that appears to rely more on automated checks than genuine security evaluations.
I'm all for keeping users safe, but by lumping all non-"Recommended” extensions into the same category, it feels like you're ignoring the effort and transparency many developers like me put into our work. Clear guidance on how to
@KarimAziev
KarimAziev / debug_polygon.scad
Created June 10, 2025 18:49
Debug Polygon #scad
module debug_polygon(points, paths=undef, convexity=undef, debug=false,
arrow_size=1, font_size=4, font_color="red",
show_arrows=true) {
polygon(points=points, paths=paths, convexity=convexity);
if (debug) {
for (i = [0 : len(points) - 1]) {
pt = points[i];
@KarimAziev
KarimAziev / km-lsp-tailwind.el
Last active March 20, 2025 11:21
Km Lsp Tailwind #el
(defvar km-tailwind-candidates nil)
(defun km-tailwind--serialize (data filename)
"Serialize DATA to FILENAME.
The saved data can be restored with `km-tailwind--unserialize'."
(when (file-writable-p filename)
(with-temp-file filename
(insert