Skip to content

Instantly share code, notes, and snippets.

View sbromberger's full-sized avatar

Seth Bromberger sbromberger

View GitHub Profile
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active December 25, 2025 23:22
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!

@tapyu
tapyu / .c_cpp_files.md
Last active May 31, 2025 04:20
C/C++-related files for development in Vscode

C/C++-related files for development in Vscode

  • VScode files (they go in .vscode/) [[1]] [[2]]:
    • lauch.json: debugging configurations.
    • taks.json: create task to build the C/C++ project.
    • c_cpp_properties.json: settings related to IntelliSense.
  • .clang-format: rules for how your code should be formatted, such as indentation, line length, spacing, and so on. It is based on a predefined style to base the formatting on (in my case, I use the [Google style][3]).
  • Simple Makefile for a basic build system template.
  • Instructions to analyze a C/C++ code performance.
@cmccandless
cmccandless / pipeline.py
Last active February 27, 2019 01:25
Pipeline Demo
class Job():
def __init__(self, *args, **kwargs):
pass
def __call__(self, data):
raise NotImplementedError()
class Square(Job):
def __call__(self, data):
return [d * d for d in data]
@ramn
ramn / PrimeGenerator.scala
Last active September 19, 2019 08:14
Prime generator in Scala
val primes: Stream[Int] = 2 #:: Stream.from(3).filter { n => !primes.takeWhile(_ <= math.sqrt(n)).exists(n % _ == 0) }
def isPrime(n: Int) = primes.dropWhile(_ < n).head == n