Managing DNS (or any other infrastructure) using Terraform

Note: This post ended up being a lot longer than I expected it to be! It’s a post about why Terraform is great, even for setups where configurations don’t change often and how you can use it to share the access that you have with other people without giving them access to the actual infrastructure account. I will make a separate post about the specifics of importing DNS records from Cloudflare into Terraform and the process I used for that.

Terraform is great! It is a way to manage your infrastructure using a set of version-controlled text files with a plan command that tells you what is going to change and an apply command that applies the changes that the plan told you about.

Where terraform gets really good is when you store the Terraform State file in a GCS bucket and run the plan and apply commands in your repository’s CI.

Read More

Compiling vim with python3 support!

TL;DR

sudo apt-get install -y python3-distutils python3-dev
git clone https://github.com/vim/vim.git
cd vim
./configure --prefix=/usr/local \
     --enable-python3interp \
     --with-python3-config-dir=/usr/lib/python3.6/config-*
make
sudo make install

The Longer Version

Note: I put the commands at the top of the post because I hate it when people start with the story and the TL;DR comes at the end of the blog post. I strongly believe that the TL;DR of all blog posts and long text-filled posts should be at the top of the piece.

Read More

Firefox Add-on to jump from GitHub to CircleCI extremely fast!

What?

I use GitHub and CircleCI at work. One of the most common workflows for me, is to merge a PR, click on the repository name to go to the repo page, scroll down to the Readme and click on the CircleCI indicator to check the status of the CI job kicked by the merge.

When the CI workflow is done and completes successfully, I go back to the repo page and click on “Releases”, create a new release (a Git tag) and then again go to the readme to go back and wait for the Release CI to finish.

Once that is done, I open Spinnaker and wait some more for that to get triggered. For some reason, Spinnaker takes about 10 minutes to detect that a new image with a tag matching a provided regex was pushed to GCR.

Read More

Setting up Ubuntu 18.04 LTS on a Thinkpad

It’s been a while since I have setup a brand new computer. I did set up a Mac when I started working in September last year, but that was more of a step-by-step thing where I just started with my existing dotfiles and picked up stuff along the way from people around me who had been working for a much longer time and knew of so many great Vim extensions and tools that I had previously never heard of. Prezto was one of them!

I was going to install Ubuntu 18.04 LTS on an IBM Thinkpad L390. It was released around December last year (or earlier this year?) and sounded like a really good handy laptop for travelling, particularly.... Read More

Ongoing issue with Firefox add-ons due to an expired certificate

Note: This is an ongoing issue at the time of writing (19:30 2019-05-04 JST). The team at Mozilla is aware of this issue and is working hard to fix it as soon as they can. You can track the bug here and on the IRC channel #firefox on irc.mozilla.org.

Detection

The issue started around 6 pm PST on the 4th of May when some people noticed that their add-ons were disabled by the browser, though the add-ons were working just fine just a few hours ago. (Some people had theirs stop working during on ongoing session!) This led to the opening of a GitHub issue and a bug on Mozilla’s bug tracker for Firefox, Bugzilla.

Read More

Oh-My-Zsh to Prezto - 4 seconds faster

I have heard a lot about prezto. People who work with me use it and we got into this recent discussion about how slow a curl request inside your zshrc makes your shell. Strangely enough, I hadn’t noticed that it made the shell slow at all. In fact, I was saying that it didn’t make it any slower than without it. I removed it from my zshrc and checked it and indeed, it didn’t make my shell any slower.

A few days went by; I was thinking about this when I was next thinking about why I hadn’t noticed this clear increase in the time. So, I looked at the time my shell took to start up again. It was … interesting: 6 seconds.

YUP. 6 seconds on a machine with an SSD, 16 GB of RAM and an i7 processor. So, what is the problem here?

Read More

True Detective Season 1

This post does not have spoilers about True Detective Season 1

When Season 3 started recently, I found myself thinking about what exactly it was about True Detective season 1 that I liked so much. This post is a look into what’s great about that season.

The Plot

A murder mystery in Louisiana that is being investigated by two very different detectives: Rust and Marty. Marty is every man’s man; he has a family, two daughters and some mistakes in his character. He mingles with people well and has a good rapport with the people he works with.

Read More

Podcast Review - January 2019

Happy New Year! Let’s jump right in!

  • This American Life - The Walls - 5/5

    A fascinating episode! This American Life is one of those podcasts that I listen to rarely, but every time I do I end up with an episode that is absolute gold! This episode came out at the top of the “Trump shut down the government for a wall” news story and debates some of the amazing walls around the world. The conclusion is simple: Walls make us feel safe, irrespective of how big they are, whether there’s another wall on the other side of the wall on our side, whether it actually even exists or has been conjured out of nowhere just to pacify us. This episode also follows the story of a man who has lived all his life with a wall in his home country; A wall that has made his relatives strangers to him and how he reconciles with that. Once a wall is built, it becomes a fact of life and affects the way life is lived around it When put like that, we really see how much power walls have! An absolutely amazing episode!

Read More

Podcast Review - December 2018

Note: This post is very delayed (it should have been out on December 27th); It was stored as a note on my iPhone with a set of links. I have added a short summary of each podcast and why I liked like it other posts in this series. Let’s dive in!

  • The Daily - Ethics of Genetically Editing Babies

    This is related to the story where a Chinese scientist claimed to have created / helped make (what even is the right word?) the world’s first genetically edited babies. After discussing this case and talking about what actually happened and why it might be suspect, the guest on this show goes on to describe why one or two reckless scientists like this person can actually end up forcing countries around the world to heavily regulate or even completely stop the research into this field because they don’t trust the scientists anymore. I think that that was a very succinct explanation of why things like this are bad, while also keeping in mind that more and more of the things that we consider impossible in our lifetimes will become possible and someone will do them. And our tolerance of innovation might very well be defined by our acceptance or rejection of these ground breaking events.

Read More

Podcast Review - Nov 2018

This post might be about 20 days late, but it sure is packed with some of the best stuff that I heard in the last month. There’s a lot of foreign policy and politics related stuff this month.

  • The Impact - Plane Crash hospitals vs. Car Crash hospitals 5/5

    This episode is about how every single plane crash automatically starts an investigation. The investigation eventually leads to a diagnosis of what went wrong. Using this diagnosis, the check lists are updated, new processes are introduced to ensure that the chances of the same problem causing another accident goes down signficantly. Whereas, car crashes are rampant and happen every single day. No investigations are done, and it doesn’t seem like the situation is improving. What happens when a hospital applies the Plane crash principal to solve a problem that they realize is too big? It has a lot of subtle points about authority, ego, and how a change in a process, inside any institution, can’t be overnight even if it has provably better results.

Read More