Skip to content

Instantly share code, notes, and snippets.

Exporting (iCloud) Keychain and Safari credentials to a CSV file

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

This is the process I used to create a CSV file of his credentials in the format “example.com,user,pass”. This portable format would be pretty easy to import into 1Password or Safari in the future.

The way I went about this isn’t great; it opens up more opportunities for apps to control one’s Mac through Accessibility APIs, it writes plaintext passwords to disk, and it could use some cleaning up. A better approach might leverage the security command line tool that ships with OS X. That said, I found this method to be a fun illustration of what’s possible us

@pswaminathan
pswaminathan / multiple_results.md
Last active August 27, 2019 19:45
Benchmarking Go (Golang) UUID Packages
pswaminathan at home in ~/uuidbench
$ gb test -v -bench=. -test.benchmem
uuids
testing: warning: no tests to run
PASS
BenchmarkPbormanParse-4	 3000000	       599 ns/op	      80 B/op	       5 allocs/op
BenchmarkPbormanDump-4 	  200000	      6756 ns/op	    1520 B/op	      60 allocs/op
BenchmarkSatoriParse-4 	 1000000	      1149 ns/op	     240 B/op	       5 allocs/op
BenchmarkSatoriDump-4 3000000 584 ns/op 240 B/op 5 allocs/op
@pswaminathan
pswaminathan / git-stack
Created April 2, 2020 15:18
Git stack
#!/bin/sh
#
# git-stack: Push this commit to a branch specified in its
# commit description.
#
# -- IMPORTANT -- this script is for macOS (using BSD sed)
#
# Taken from https://wchargin.github.io/posts/managing-dependent-pull-requests/
# Copyright (c) 2017 William Chargin. Released under the MIT license.