Posts

Showing posts from August, 2018

Amazon EC2 Servers as Cheap, Disposable Tools

Since Chrome now makes it embarrassing to serve HTTP, I decided my project had to support HTTPS. LetsEncrypt , a source of free certificates, is awesome. However... their automagical certificate generation software runs on almost every OS, except Amazon's house brand "Linux 2". And of course that's what I had chosen when I set up my EC2. My Hackish Idea: Just spin up another server. For the price of a coffee, I could start a server running a distro that works easily with LetsEncrypt's tool. I chose Ubuntu. Then I just ran a super-simple Nginx setup, pointed my domain at the new box, and generated the certificate. I had planned to move the certificate to my "real" EC2... and make a better plan before it expired. But I changed my mind and moved my project to the Ubuntu EC2, because it had proven it could play well with others. But I still really like the idea that I can solve a problem by making a "throwaway" server, the way I

Git is Weird and Uses Magic

Help! I've fallen into a repo and can't get out! A git repo is just a directory with a .git subdirectory, which is full of magic. When you use Git, you literally cd into a repo to do your work. You don't need a server, or even another directory somewhere else on disk. All you need is one directory with a .git subdirectory. That's your repo.  And you work inside of it. That's weird. Definition: Workspace My workspace is everything in my directory, except for the magic .git subdirectory. Note: For this article, I'm just going to assume all files are tracked. i.e. they've all been git added. Untracked files exist. But tracked and untracked and staged and unstaged are not nearly as weird as what I'm talking about today. git init is pretty darn local When I cd into a directory with a bunch of source files and type git init, git creates a .git subdirectory right there in my current directory. And now, drumroll....., my current directory