Switch between multiple Claude Code subscriptions (personal / work / API key) on macOS using Keychain.
Lightweight alternative (~80 lines of bash) to heavier solutions. No dependencies beyond Python 3 and macOS security CLI.
Three pieces:
This is how you can take an OpenVPN .ovpn config file and extract the certificates/keys required to import the profile into NetworkManager.
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| # use https://github.com/lambci/docker-lambda to simulate a lambda environment | |
| docker run -it --rm --entrypoint bash -e ODBCINI=/opt/odbc.ini -e ODBCSYSINI=/opt/ lambci/lambda:build-python3.7 | |
| # download and install unixODBC | |
| # http://www.unixodbc.org/download.html | |
| curl ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz -O | |
| tar xzvf unixODBC-2.3.7.tar.gz | |
| cd unixODBC-2.3.7 | |
| ./configure --sysconfdir=/opt --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE --prefix=/opt |
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")References:
| // Restify Server CheatSheet. | |
| // More about the API: http://mcavage.me/node-restify/#server-api | |
| // Install restify with npm install restify | |
| // 1.1. Creating a Server. | |
| // http://mcavage.me/node-restify/#Creating-a-Server | |
| var restify = require('restify'); |
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
For HTTPS connection use whiledo/docker-remote-api-tls.
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
| function Install-VisualStudio | |
| { | |
| [CmdletBinding()] | |
| param ( | |
| [string] $ImagePath, | |
| [string[]] $ArgumentList, | |
| [string] $InstallPath, | |
| [string] $ProductKey | |
| ) | |
| Write-Verbose "Install Visual Studio 2012..." |