Skip to content

Instantly share code, notes, and snippets.

View axsaucedo's full-sized avatar

Alejandro Saucedo axsaucedo

View GitHub Profile
@axsaucedo
axsaucedo / multiple_github_ssh.md
Created November 22, 2025 20:05
Use different SSH keys for multiple github accounts with URL pattern matching

Multiple GitHub Accounts with Automatic SSH Key Selection

This approach allows you to use different ssh keys with multiple github accounts only with git config, and without any intrusive changes in repos / urls.

This approach allows for routing of SSH keys based on URL regex in the global gitconfig (no SSH config required).

From what I can see min requirements are Git 2.36+ as it introduced hasconfig support.

Why this approach

# ...previous code blocks
mgr = kp.Manager()
# ...latter code blocks
@axsaucedo
axsaucedo / main.cpp
Last active September 10, 2020 05:58
Initial manager creation
// Single header include for Kompute
#include "kompute/Kompute.hpp"
int main() {
// Vulkan resources get created unless passed
kp::Manager mgr(0); // Selects GPU device at index 0
//... continued in next section
}
@axsaucedo
axsaucedo / calculate_size.py
Created March 13, 2019 12:05
Print the size of an azure blob with the Python AzureSDK
import os
from azure.storage.blob import BlockBlobService, PublicAccess
CONTAINER_NAME = os.environ["AZURE_CONTAINER_NAME"]
AZURE_STORAGE_ACCOUNT = os.environ["AZURE_STORAGE_ACCOUNT"]
AZURE_STORAGE_KEY = os.environ["AZURE_STORAGE_KEY"]
bbs = BlockBlobService(
account_name=AZURE_STORAGE_ACCOUNT,
account_key=AZURE_STORAGE_KEY)