Jack Dunne
curl card
Happy first blog post.
While constructing this website, I was looking around online for others’ personal websites/developer portfolios for my own reference. I came across a fair few decent ideas in general (with some being more relevant to my wants than others), although one in particular seemed fairly fun & harmless.
It was a business card, albeit shared via cURL;1 the Linux tool used to transfer data across the Internet. I usually tag it at the end of emails.
I don’t carry business cards (yet). It’s mostly because I have the incessant need to be clever at every interval, and I haven’t quite came up with any particularly good designs for a physical card. Also it costs money. And it reminds me of that American Psycho scene. But this digital business card subverts all those downsides, and I figured it’d be a nice little Easter egg for those brave enough to type commands they found on the Internet into their terminals.
Implementation
The initial implementation is dead-simple. All that’s required overall is to create a text file and host it somewhere on the Internet that allows permalinks to raw files. Since curl returns the contents of raw HTML by default, you can effectively treat .html files as raw text.
To do nicer things however (like colours, etc.), it’s best for you to use a shell script. Ideally you’d use tput, which makes text styling universal across different terminals. You’d wrap this up in a script so that you’d also be able to edit & recompile easily, should your details change. When you call it, you’d then redirect the output to a .html file so that you’d be able to serve its parent directory (for a cleaner URL).
Then you can host it anywhere that’s accessible on the Internet. If you’re serving the raw file (or you want to remove the https:// prefix), you’ll have to add the -s and -L flags when calling curl; to silence output and to follow redirects respectively. If you care about the flags, throw it into a directory that’s named “card” (or whatever endpoint you want) as index.html, at the cost of a slightly longer command. Just don’t forget your ending slash.
You can use mine for reference, if you’d like.
Examples
Some people go nuts over these sorts of ASCII-art yokes. I’m not particularly one for gilding the lily, so I went (mostly) monochrome & minimal.

Bryan Jenks, and subsequently Matthias Thym & Brandon Rozek, probably share my taste for minimalism.

Jake Ginesin (from whom I first discovered the idea) adds a handwritten signature with his.

Rahul Sivananda seems to prefer maximalism instead.

-
I pronounce curl by the letter. Some of my friends pronounce it normally. ↩