Skip to content

Instantly share code, notes, and snippets.

@JeffCarpenter
JeffCarpenter / download-cachyos.sh
Created July 19, 2025 06:03
download cachyos with aria2
#!/usr/bin/env bash
# CachyOS ISO Downloader - Max Concision
set -euo pipefail
# --- Config ---
readonly I="cachyos-desktop-linux-250713.iso" # ISO filename
readonly M_ESC="magnet:?xt=urn:btih:f4e9c04ba9706d03ebaf43b1b031da6e59173af9&dn=cachyos-desktop-linux-250713.iso&tr=udp%3A%2F%2Ffosstorrents.com%3A6969%2Fannounce&tr=http%3A%2F%2Ffosstorrents.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&tr=udp%3A%2F%2Ftracker-udp.gbitt.info%3A80%2Fannounce&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Fexodus.desync.com%3A6969%2Fannounce&tr=udp%3A%2F%2Ftracker.theoks.net%3A6969%2Fannounce&tr=udp%3A%2F%2Fopentracker.io%3A6969%2Fannounce&ws=https%3A%2F%2Fcdn77.cachyos.org%2FISO%2Fdesktop%2F250713%2Fcachyos-desktop-linux-250713.iso&ws=https%3A%2F%2Fcdn.cachyos.org%2FISO%2Fdesktop%2F250713%2Fcachyos-desktop-linux-250713.iso&ws=https%3A%2F%2Faur.cachyos.org%2FISO%2Fdesktop%2F
@JeffCarpenter
JeffCarpenter / geo_interface.rst
Created January 14, 2025 06:59 — forked from sgillies/geo_interface.rst
A Python Protocol for Geospatial Data

Author: Sean Gillies Version: 1.0

Abstract

This document describes a GeoJSON-like protocol for geo-spatial (GIS) vector data.

Introduction

@JeffCarpenter
JeffCarpenter / quant-fp8.ipynb
Created October 15, 2024 14:59
quant-fp8.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JeffCarpenter
JeffCarpenter / add_or_update_firewalld_policy.sh
Created September 6, 2023 01:40
Bash function to add or update a firewalld policy for accepting incoming traffic on a specified port.
#!/bin/bash
# Function to add or update firewalld policy
add_or_update_firewalld_policy() {
local protocol=$1
local port=$2
local zone=$3
# Check if the rule already exists
if firewall-cmd --zone=$zone --query-port=$port/$protocol; then
@JeffCarpenter
JeffCarpenter / gh2sqlite-starred-tb.py
Last active September 27, 2022 19:32
github-to-sqlite starred ~/.local/share/dogsheep/github.db 39.51s user 72.27s system 11% cpu 16:28.50 total
Traceback (most recent call last):
File "/Users/jeff/brew/bin/github-to-sqlite", line 8, in <module>
sys.exit(cli())
File "/Users/jeff/Library/Python/3.10/lib/python/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/Users/jeff/Library/Python/3.10/lib/python/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/Users/jeff/Library/Python/3.10/lib/python/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/jeff/Library/Python/3.10/lib/python/site-packages/click/core.py", line 1395, in invoke
;; To run export from Bash:
;; emacs -batch -l ~/.emacs.d/init.el -eval "(org-agenda-export-to-ics)" -kill
;; if [[ "$?" != 0 ]]; then
;; notify-send -u critical "exporting org agenda failed"
;; fi
(setq org-directory "~/Dropbox/org/")
(defun set-org-agenda-files ()
"Set different org-files to be used in `org-agenda`."
(setq org-agenda-files (list (concat org-directory "things.org")
#!/bin/sh
# dependencies:
# - antiword & pandoc: installable with the package manager in any major distro
# - html2csv: `pip install html-to-csv`
antiword -x db "$1" | pandoc --from=docbook --to=html | html2csv -
@JeffCarpenter
JeffCarpenter / wwb-emulator.c
Last active June 27, 2024 13:13
ATTiny45-based 60Hz WWVB signal transmitter by Steven Mullins
/*
3-20-14
Copyright Steven Mullins 2014
ATTiny45
60Khz Transmitter
Modulated with WWVB signal
Source: https://www.instructables.com/WWVB-radio-time-signal-generator-for-ATTINY45-or-A/
@JeffCarpenter
JeffCarpenter / module-dep-tree.sh
Created August 12, 2021 16:12
Draw kernel module dependency graph
# Author: bandie91
# Source: https://www.commandlinefu.com/commands/view/9775/draw-kernel-module-dependancy-graph
lsmod | perl -e 'print "digraph \"lsmod\" {";<>;while(<>){@_=split/\s+/; print "\"$_[0]\" -> \"$_\"\n" for split/,/,$_[3]}print "}"' | dot -Tpng | display -
@JeffCarpenter
JeffCarpenter / LatencyTester.ino
Created July 13, 2021 16:12 — forked from trishume/LatencyTester.ino
Latency Tester and Foot Pedals Teensyduino sketch
// Tristan's Foot Pedals and Latency Tester Arduino Program
// Provides 5 buttons: left click, right click, scroll up, scroll down, latency test
// If you don't want all of these you can comment out the buttons you don't need.
#define BOUNCE_LOCK_OUT
#include <Bounce2.h>
#include "Keyboard.h"
const int scrollInterval = 80;