The beauty of Go

I recently started exploring Go for some of my side projects and was really struck by its beauty. I realized how beautifully it made a balance between ease of use (generally associated with dynamically typed, interpreted languages), and performance and safety (type safety, memory safety etc) (generally associated with statically typed, compiled languages). Apart from … [Read more]

Truly atomic deployments with NGINX and PHP-FPM

Notice: This solution only works if NGINX and PHP-FPM both reside on the same server. A ‘git pull’ on a live server for deployments isn’t ideal since all files don’t change on the disk at the same millisecond. A request that starts on one version of the code might access other files which could be … [Read more]

Preventing Bash Script Disasters

So you just wrote a bash script and you’re scared of running it on your system due to a lurking rm -rf statement in the script. Here is some stuff you can use to prevent disasters due to unhandled errors in your scripts: 1) Use set -u (Just put set -u at the top of … [Read more]