Skip to content

Instantly share code, notes, and snippets.

@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active November 11, 2026 15:59
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!

@hyperupcall
hyperupcall / settings.jsonc
Last active March 17, 2026 09:13
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@maixuanhan
maixuanhan / install-ubuntu-server-via-console.md
Last active April 6, 2023 06:41
Install Ubuntu server 18.04 via USB disk and serial console
@kaxing
kaxing / lxc-loop-device.note.md
Last active October 24, 2022 01:27
Mount Image file or loop device inside lxc container
@mpontillo
mpontillo / maas-cli-commands.sh
Last active August 5, 2025 14:57
MAAS jq tricks and how to move interfaces between fabrics (via changing the interface's VLAN)
maas refresh
profile=$(maas list | head -1 | awk '{ print $1 }')
# This generates a single JSON object.
maas $PROFILE machines read | jq '[.[] | {hostname:.hostname, system_id: .system_id, status:.status}]'
...
maas $PROFILE machines read | jq '.[] | {hostname:.hostname, system_id: .system_id, status:.status}' --compact-output
{"hostname":"pxe-bond1","system_id":"xrey6h","status":4}
@mietek
mietek / set-up-l2tp-ipsec-vpn-on-debian.md
Last active January 28, 2026 08:25
Set up L2TP/IPsec VPN on Debian

Set up L2TP/IPsec VPN on Debian

Set up IPsec

Set up networking

# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@geoffb
geoffb / simple_websocket_client.html
Created October 7, 2010 23:37
Super simple websockets client/server using Python. Compatible with the draft 76 challenge/response.
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebSocket Client</title>
<style>
#output {
border: solid 1px #000;
}
</style>
</head>