Skip to content

Instantly share code, notes, and snippets.

View aduitsis's full-sized avatar

Athanasios Douitsis aduitsis

  • Juniper Networks
  • Athens, Greece
View GitHub Profile
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active May 10, 2026 04:48
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!

@awni
awni / mlx_distributed_deepseek.md
Last active April 24, 2026 10:06
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:

@rain-1
rain-1 / llama-home.md
Last active March 1, 2026 16:35
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@kconner
kconner / macOS Internals.md
Last active May 3, 2026 04:24
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@mysteriouss
mysteriouss / key-remap.md
Last active March 20, 2026 01:36
M1 MacBook Air F5 & F6 KeyRemap
#!/bin/sh

## xref: https://www.reddit.com/r/MacOS/comments/jy5ry8/m1_macbook_air_keysshortcut_for_keyboard/ghryk3j/?utm_source=reddit&utm_medium=web2x&context=3

cat > ~/Library/LaunchAgents/com.local.KeyRemapping.plist << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@mildsunrise
mildsunrise / hid_keycodes.md
Last active April 4, 2026 12:21
USB HID keycode table + JSON, extracted from HID Usage Tables v1.21

Keyboard/Keypad Page (0x07)

This section is the Usage Page for key codes to be used in implementing a USB keyboard. A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all associated usage codes as indicated in the Boot column below.

The usage type of all key codes is Selectors (Sel), except for the modifier keys Keyboard Left Control (0x224) to Keyboard Right GUI (0x231) which are Dynamic Flags (DV).

Note: A general note on Usages and languages: Due to the variation of keyboards from language to language, it is not feasible to specify exact key mappings for every language. Where this list is not specific for a key

@sneakers-the-rat
sneakers-the-rat / wwe.txt
Last active May 8, 2026 00:29
wwe_corpus
Welcome to Wrestlemania!
Woodstock was to rock and roll, what WrestleMania is to wrestling.
Finally, your men, in a very controversial match...
What do you mean "controversial"? He pinned him right in the center of the ring, didn't he? Did he or did he not pin him for the count of three?
Where's that cane of yours?
What cane? I...didn't have no cane!
All right, we're just moments away from the big one. When I say big, the battle of the titans. Big John Studd, Bobby Heenan, come in. Andre the Giant putting his entire career on the line.
Oh man, this bag is heavy man! This is what it was all about. $15,000 that we used for bait. John Studd, the only giant of wrestling. 7 foot plus, nearly 400 pounds of solid muscle. And this is what we wanted to prove to the whole world that I am the giant in a few short moments, along with this $15,000. You're going to see me in the ring and you're going to see the last match of Andrea because he retires if he can't do it.
Bobby Heenan, I'm just counting the money here.
You kn
@ErikAugust
ErikAugust / spectre.c
Last active October 7, 2025 15:37
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@troyfontaine
troyfontaine / 1-setup.md
Last active April 24, 2026 20:27
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.