Home ¦ Posts ¦ Books ¦ Articles ¦ Talks ¦ Notes > Category: software ¦ Atom

Posts on software

flyway baseline: Introducing flyway migrations into existing database

If you are trying to introduce flyway to an existing database with the schemas and tables already created, you may find flyway baseline command useful.

Let's say you already have the migration scripts written, or perhaps dumped out of your existing DB setup, and they are:

V2__foo_new.sql …

Git: Staging partial changes in a file

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 …

flyway, SQL server and non-empty schema?

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 …

Download a file using `curl` - How hard can it get?

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
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&amp;X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180914%2Fus-east-1 …

Powershell: Measuring seconds elapsed

I have been working with PowerShell for three months now, and my approach to using it has been pretty much google and trial - copying things, modifying things till they work and learning new things on the way. This post talks about a discovery which I made today.

I had a …

How does ping roughly work over IPv4 on Linux?


The ping program is one of the most common programs which is used to check the "aliveness" of a host and a typical execution looks as follows:

$ ping -c 1 -4

PING ( 56(84) bytes of data …

Sorted Sets in Redis from CLI, Python and Golang

In this post, we will see a demo of sorted sets in redis. I just learned about them and I think they are really cool! This post shows how we can play with sorted sets first via the redis-cli, then from Python and Golang.

 .───────────────.          │            │           .─────────────.
(    Redis CLI    )   ───▶  │   Redis    │  ◀─────  (    Golang     )
 `───────────────'          │            │           `─────────────'
                          (    Python     )

We …

Why RPC in Microservices instead of HTTP?

The Freelancer.com REST API is powered by a number of backend services. The API itself is powered by a Python HTTP server which communicates with the other services (Python, Golang and PHP) via RPC calls implemented using Apache Thrift. It is only during the past 2.5 years that …

Data in C and CPython

In the last two articles (Data in CPython and Data in C), as it turned out, I discussed two fundamental points in each language:

  • What happens in an assignment operation (such as a=2)?
  • Are separate copies of data created or references passed to the original when they are sent …

Using Travis CI to publish to GitHub pages with custom domain

As of yesterday, this blog is automatically being published via Travis CI. When I push a new commit to my GitHub repository it triggers a new build in Travis CI. The build completes and the the git repository is then updated with the generated output (mostly HTML with some static …

© Amit Saha. Built using Pelican. Customised theme based on the one by Giulio Fidente on github.