Skip to content

Instantly share code, notes, and snippets.

@douglascamata
douglascamata / SSH_MACOS_SECURE_ENCLAVES.md
Created November 23, 2025 20:56 — forked from arianvp/SSH_MACOS_SECURE_ENCLAVES.md
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!

@douglascamata
douglascamata / settings.json
Created April 30, 2025 16:55 — forked from brotherkaif/settings.json
LazyVim keymappings for VSCode
{
"vim.showMarksInGutter": false,
"vim.foldfix": true,
"vim.surround": true,
"vim.easymotion": true,
"vim.easymotionKeys": "asdghklqwertyuiopzxcvbnmfj",
"vim.leader": "<space>",
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [":", "w", "<CR>"],
@douglascamata
douglascamata / settings.jsonc
Created May 15, 2023 11:49 — forked from hyperupcall/settings.jsonc
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!!
{
@douglascamata
douglascamata / install_ruby_rpi.sh
Created April 3, 2018 20:13 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.5 on the Raspberry Pi (Raspbian)
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby 2.5 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Welcome message

Keybase proof

I hereby claim:

  • I am douglascamata on github.
  • I am douglascamata (https://keybase.io/douglascamata) on keybase.
  • I have a public key ASDMEt8fIWbzvdVJDYSHFZu8AbrLlwYq-mRsfM3lihWxrgo

To claim this, I am signing this object:

@douglascamata
douglascamata / gist:60be9ed13634c774c4be
Created January 6, 2016 19:51
Verifying my blockchain id
Verifying that +douglascamata is my blockchain ID. https://onename.com/douglascamata
@douglascamata
douglascamata / fish_prompt.fish
Created October 28, 2014 22:10
Numist fish prompt
# name: Numist
function fish_prompt
set -l last_status $status
# Colours
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l green (set_color -o green)
set -l red (set_color -o red)
set -l blue (set_color -o blue)
if not isinstance(processing_result, list):
processing_result = [processing_result]
for user_attribute in processing_result:
if user_attribute is not None:
print "INDEXING user_attribute = '%s'" % user_attribute
self.es_conn.index("user", module["index_name"], user_attribute, id=attribute_id)
@douglascamata
douglascamata / death_of_ifs.rb
Last active December 16, 2015 16:48
Another solution to this post (http://jumpstartlab.com/news/archives/2013/04/23/the-death-of-ifs) with objects that can do real stuff, like Twitter (or any other social network, i.e.) API calls.
def start
command = ""
command_processor = CommandProcessor.new
command_processor.add_command('follow', Proc.new { puts 'do some stuff' })
while command != "q"
printf "enter command: "
command = gets.chomp
command_processor.process(command)
end
end
def start
command = ""
command_processor = CommandProcessor.new
command_processor.add_command('follow', 'following')
while command != "q"
printf "enter command: "
command = gets.chomp
command_processor.process(command)
end
end