Index ¦ Archives ¦ Atom > Author: Amit Saha

Setting up AWS EC2 Assume Role with Terraform

In this post, we will see how we can implement the AWS assume role functionality which allows an IAM role to be able to obtain temporary credentials to access a resource otherwise only accessible by another IAM role. We will implement the infrastructure changes using Terraform and see how to …

Automatic building and publishing DEB packages for Golang applications

In my earlier post, Quick and dirty debian packages for your Golang application I shared a recipe building DEB packages for Golang applications. We are going to see the following things in this post building upon our recipe in that post:

  • Building the DEB packages in Travis CI
  • Publishing the …

Detecting RLO character in Python

At work, I learned about how Right-to-Left Override was being used to make actually malicious files to look harmless. For example, a .exe file was being made to appear as .doc files. We didn't want to allow uploading such files. This meant that I nedded to detect the presence of …

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 …

Python: Using specific git commits of third party packages

After a fair number of furious impatient attempts to try and use specific git commits of third party packages in my Python software, I finally have been able to make it work. I went back to the drawing board - basically reading setup-vs-requirement.


This is what I did:

  • If you …

Why RPC in Microservices instead of HTTP?

The 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 …

C/C++ Scientific Programming Libraries and Tools

math.h provides basic mathematical functions as part of the C standard library and are also usable from C++. However, it needs to be supplemented with custom libraries when advanced numerical functionalities are desired. In this article, we shall take a look at two such libraries - the GNU Scientific Library …

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 …

Resource Acquisition Is Initialization (RAII) in C

GCC's C compiler allows you to define various variable attributes. One of them is the cleanup attribute (which you can also write as __cleanup__) which allows you to define a function to be called when the variable goes out of scope (for example, before returning from a function). This is …

Data in C

In C, the data you use in your programs will usually fall into one of the three basic categories: int, char and float. Data in C has no existence without an associated memory location labeled by an identifier, usually referred to as a variable (the term variable is a bit …

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