Let's say you have made a few changes to a file and only want to stage only some of those changes for commit. You may want to do so either to create a nice commit history or may be you just want to discard some of the changes. Either way …
Hello, My name is Amit - I am interested in programming, software tools, systems and infrastructure. A lot of what I explore in software makes it to my blog posts, articles, books, talks and GitHub repositories. If you would like to get an email everytime I write something new, please subscribe to my newsletter. You can contact me via email, on Twitter and on LinkedIn.
My post recent posts are below. So far, I have written about C, Fedora, Golang, Infrastructure, Python and various others.
While attempting to use flyway for SQL server schema migrations, I was consistently getting
an error of the form
Found non-empty schema xxx ithout metadata table! Use init() or set initOnMigrate to true to
initialize the metadata table.. Okay, so easy - let me just delete the tables, drop the schema …
While working on creating a template file for a Golang project, I wanted to better understand how to work
with data in Golang templates as available via the
html/template package. In this post, I discuss
a few use cases that may arise.
Accessing a variable
Let's consider our first …
I wanted to download the prometheus binary using
curl. My first attempt:
$ curl https://github.com/prometheus/prometheus/releases/download/v2.4.0/prometheus-2.4.0.linux-amd64.tar.gz <html><body> You are being <a href="https://github-production-release-asset-2e65be.s3.amazonaws.com/6838921/5c87dc00-b5d1-11e8-8a3a-fd29b54e0c60?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180914%2Fus-east-1 …
In this post, we learn how we can make use of
docker's user namespacing feature on Linux in a CI/build environment
to avoid running into permission issues. Using user namespacing also keeping things a bit sane without adopting
Let's consider that we are leveraging
AWS Route 53 private hosted zones enable you to have private DNS names which only resolve from your VPC. This is great when working from EC2 instances since everything is setup and ready to go. This however becomes a problem when using docker containers on a systemd system. On such …
In this post, I discuss a problem (and its solution) I encountered while working with AWS (Amazon Web Services) Network ACLs, docker containers and ephermal port ranges.
A Linux EC2 instance with
docker engine running in a VPC with inbound and outbound traffic controlled by Network ACLs.
AWS lambda functions look deceptively simple. The devil is in the details though. Once you
have written the code and have created a
.zip file, there's a few more steps to go.
For starters, we need an IAM profile to be defined with appropriate policies allowing the function to access …
I went into working with Windows docker containers after having been worked with docker on Linux exclusively. My goal was to have isolated environments for each build in a continuous integration pipeline. That is, each build happens on an exclusive build host (AWS EC2 VM instance) and every database and …