Skip to content

Instantly share code, notes, and snippets.

@kamranrad1993
kamranrad1993 / lldb.txt
Created August 3, 2022 19:22 — forked from hotwatermorning/lldb.txt
Step into std::function with lldb of Xcode
(lldb) settings show target.process.thread.step-avoid-regexp
target.process.thread.step-avoid-regexp (regex) = ^std::
(lldb) settings set target.process.thread.step-avoid-regexp ""
http://stackoverflow.com/questions/19413181/step-into-stl-sources-in-xcode-5
@kamranrad1993
kamranrad1993 / iptables-redsocks.sh
Created November 27, 2022 05:56 — forked from ChronoMonochrome/iptables-redsocks.sh
RedSocks proxy for Linux
#!/bin/bash
# Create new chain
sudo iptables -t nat -N REDSOCKS
# Ignore LANs and some other reserved addresses.
sudo iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 169.254.0.0/16 -j RETURN
sudo iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN
@kamranrad1993
kamranrad1993 / kind_static_ips.sh
Created May 11, 2025 11:52 — forked from lixianyang/kind_static_ips.sh
This script assign static IP to all nodes of a kind cluster
#!/bin/bash
set -e
# Workaround for https://github.com/kubernetes-sigs/kind/issues/2045
all_nodes=$(kind get nodes --name "${CLUSTER_NAME}" | tr "\n" " ")
declare -A nodes_table
ip_template="{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}"
echo "Saving original IPs from nodes"
@kamranrad1993
kamranrad1993 / libfprint-custom-build.txt
Created June 12, 2025 10:29 — forked from AmulyaX/libfprint-custom-build.txt
Use custom built libfprint to add fixes for specific drivers
# Clone fprintd source code
git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
# Checkout to our good guy who made a patch for sensor
# 1c7a:0587 LighTuning Technology Inc. ETU905A88-E
git fetch "https://gitlab.freedesktop.org/thameruddin/libfprint.git" 'egismoc-0587'
git checkout -b 'libfprint-egismoc-0587' FETCH_HEAD
# Try building the code
cd libfprint