Skip to content

Instantly share code, notes, and snippets.

View thomaswitt's full-sized avatar
🚀
🚀 Entrepreneur @ http://Vendis.ai •🪽Angel Investor @ http://Expedite.Ventures

Thomas Witt thomaswitt

🚀
🚀 Entrepreneur @ http://Vendis.ai •🪽Angel Investor @ http://Expedite.Ventures
View GitHub Profile
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active December 29, 2025 18:35
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@cannikin
cannikin / disable_falcon_console_logging.rb
Last active October 13, 2025 20:32
Initializer to attempt to revert development logging using Falcon + Rails back to Rails default
# frozen_string_literal: true
# Disable console-adapter-rails and restore standard Rails logging
# The falcon-rails gem automatically includes console-adapter-rails which
# overrides Rails' default logging format. This initializer restores the
# standard Rails logging behavior including request logging.
if Rails.env.development?
Rails.application.configure do
# Set up standard Rails logging before Falcon takes over
@lazaronixon
lazaronixon / _form.html.erb
Last active September 22, 2025 15:08
Hotwire Event-Driven Update Pattern
<%= form_with model: citizen, class: "card flex flex-col gap", data: { controller: "form" } do |form| %>
<div class="flex flex-col gap mb-2">
<div class="flex flex-col gap-half">
<% countries = Country.order(:name) %>
<%= label_tag :country_id, "Country", class: "text-sm font-medium leading-none" %>
<%= select_tag :country_id, options_from_collection_for_select(countries, :id, :name, citizen.country_id), include_blank: "Select one", class: "input", data: { action: "form#submit", form_submitter_param: "on_country_change" } %>
</div>
<div class="flex flex-col gap-half">
<% states = State.where(country_id: citizen.country_id).order(:name) %>
@jwbee
jwbee / jq.md
Last active December 25, 2025 23:33
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@dautovri
dautovri / applemapsguide.py
Created March 7, 2025 11:31
Apple Guides decoding
#!/usr/bin/env python3
import base64
import re
import binascii
import sys
import urllib.parse
from datetime import datetime
from dataclasses import dataclass
from typing import List, Optional
@awni
awni / mlx_distributed_deepseek.md
Last active December 27, 2025 00:18
Run DeepSeek R1 or V3 with MLX Distributed

Setup

On every machine in the cluster install openmpi and mlx-lm:

conda install conda-forge::openmpi
pip install -U mlx-lm

Next download the pipeline parallel run script. Download it to the same path on every machine:

@coltenkrauter
coltenkrauter / blocking-traffic-between-vlans-unifi-router.md
Last active June 3, 2025 15:20
This guide provides a detailed step-by-step walkthrough to help you enhance network security by blocking traffic between VLANs on Unifi routers including UDM, UDM-SE, and the Dream Router. Follow these guidelines to create an IP group representing the internal IP ranges according to RFC1918 and configure firewall rules that prioritize blocking t…

Blocking Traffic Between VLANs on Unifi Router (UDM, UDM-SE, Dream Router)

Greetings, network enthusiasts! Today, we are set to embark on an essential task: enhancing the security of your network by blocking traffic between VLANs on Unifi routers such as UDM, UDM-SE, and the Dream Router. Join us as we delve into the nuances of RFC1918 IP ranges and configure firewall rules to safeguard your network effectively.

Table of Contents

  1. Introduction
  2. Why is this Important for Security?
  3. Official Documentation and RFC Links
  4. Instructions
@coltenkrauter
coltenkrauter / crafting-effective-gists.md
Last active September 5, 2024 07:07
This handbook serves as a comprehensive guide for developers, elucidating the process of crafting insightful Gists. Learn how to encapsulate challenges, solutions, and experiences, fostering a vibrant and collaborative knowledge-sharing community.
@plmcgrn
plmcgrn / sonos-udm-mutiple-networks.md
Last active May 10, 2025 05:04
Unifi UDM and Sonos home theater with multiple VLAN's

Overview

This goal of this setup is to put the Sonos speakers on an untrusted network to keep all but the required traffic away from the trusted network where devices like personal computers, phones, etc. live. This write-up assumes you already have two networks setup and working.

Important Note on Unifi OS 3.x

UI broke cross-VLAN multicast DNS in this version. See below for steps to install the multicast-relay script to re-enable this. Without it, your Sonos controller app will not be able to discover your speakers on the other VLAN.

System

I have a Sonos Playbar, Sub, and 2 Play:3's as rear surrounds as one home theater setup connected to a UDM (non-Pro, but this should work on Pro too). Some of this setup may be easier for people with non-paired speakers, as Sonos does some shenanigans with which speaker is actively sending traffic to your wifi.

@Evavic44
Evavic44 / domain.js
Last active December 25, 2025 11:54
A list of popular email domains (TLDs) - 2023
const domains = [
"gmail.com",
"yahoo.com",
"hotmail.com",
"aol.com",
"hotmail.co.uk",
"hotmail.fr",
"msn.com",
"yahoo.fr",
"wanadoo.fr",