Skip to content

Instantly share code, notes, and snippets.

@sefidel
sefidel / dns-false-positives.txt
Created February 20, 2024 13:05
Whitelist of legitimate domains that upstream blocklist refuses to remove
# https://github.com/blocklistproject/Lists/issues/1114
daum.net
daumcdn.net
m1.daumcdn.net
t1.daumcdn.net
@sefidel
sefidel / pvpn-byok.py
Created January 6, 2024 10:57
Bring your own WireGuard key to ProtonVPN (hacky; see NOTE for limitations)
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3Packages.inquirer -p 'python3Packages.proton-client.overridePythonAttrs { doCheck = false; patches = [(fetchpatch {url = "https://github.com/ProtonMail/proton-python-client/pull/47/commits/faee82fdcad9fd2963a8080573e9b5315697dac7.patch";sha256 = "sha256-AvPgsBBnlp0bmHbIwA4BQ6KmsAZmlgwJnHynWIL6an8=";})]; }'
# ProtonVPN - Bring your own (WireGuard) key
# ------------------------------------------
# This script lets you roll your own WireGuard key instead of using the one
# generated from ProtonVPN.
# This may be particularly useful when using ProtonVPN as an exit node in
# overlay network solutions, such as Tailscale.
@sefidel
sefidel / kagi.css
Last active April 11, 2024 16:57
Kagi Custom CSS. NOTE: Recent Kagi update has introduced a lot of unexpected breaking changes. I'm working on a fix.
/* Personal Tweaks */
.doggo-sit {
display: none;
}
/* Theme - Dark */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
.theme_dark {
--k-accent: #f16d43;
--k-accent-alt: #62a09d;
@sefidel
sefidel / tailscale-sign-mullvad.sh
Last active November 11, 2023 10:58
Sign all mullvad nodes for use in a locked tailnet.
set -euo pipefail
die () {
echo >&2 "$@"
exit 1
}
echo "This script will blindly sign all nodes with name '*.mullvad.ts.net.'."
read -p "If you wish to proceed, please enter 'Yes, I wish to proceed': " confirm
@sefidel
sefidel / lpc55s69-probe-debug.log
Created October 15, 2023 13:36
probe-rs debug log: LPC55S69-EVK CMSIS-DAP connection failure
INFO probe_rs: Writing log to "/home/sefidel/.local/share/probe-rs/1697373810216.log"
DEBUG probe_rs::config::registry: Searching registry for chip with name LPC55S69JBD100
DEBUG probe_rs::config::registry: Exact match for chip name: LPC55S69JBD100
WARN probe_rs::config::target: Using custom sequence for LPC55S16/26/28/66/69
DEBUG list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Searching for CMSIS-DAP probes using libusb
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Interface 0: LPC-LINK2 CMSIS-DAP V5.361
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: HID interface found
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: LPC-LINK2 CMSIS-DAP V5.361: CMSIS-DAP device with 5 interfaces
TRACE list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Will use interface number 0 for CMSIS-DAPv1
DEBUG list_all:list_cmsisdap_devices: probe_rs::probe::cmsisdap::tools: Found 1 CMSIS-DAP probes using libusb, searchi
@sefidel
sefidel / foot-emacs.src
Last active August 28, 2023 10:18
Foot terminfo with Emacs 24-bit colour support
# NOTE: Foot should work out of the box with Emacs >28.
# This file exists to get around the issue with `RGB` capability, which is:
# - #000000~000007 is interpreted as color0~7 for backwards compatibility
foot-emacs|foot with 24-bit direct color mode for Emacs,
use=foot,
setb24=\E[48\:2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&\
%d\:%p1%{255}%&%dm,
setf24=\E[38\:2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&\
%d\:%p1%{255}%&%dm,
@sefidel
sefidel / vimrc
Created August 12, 2023 06:12
My fallback vim configuration
" sefidel's fallback vim configuration
"
" Just in case when all you have is Vim
"
" Last Modified: 2023-08-12 (v2)
set nocompatible " no Vi compatibility
" Colours
set t_Co=256