TwitterRSS Feed

Esc.sh

Random notes from an Engineer

Blogging, Jekyll

Load disqus comments on button click (Jekyll)

Making sure that Disqus doesn't slow down your website for no reason. By making disqus load only when a button is clicked, we can improve the page load speed dramatically
Mansoor A
Mansoor A
2 min read
HowTo, HomePage

Migrating the Authenticator app to a new device

Moving all your 2FA codes from an authenticator app to another (only for rooted android devices)
Mansoor A
Mansoor A
1 min read
Ops

Fixing Letsencrypt renewal errors on SSL only domains

Allowing Let'sEncrypt to do the HTTP validation while enforcing HTTP to HTTPS redirection
Mansoor A
Mansoor A
1 min read
Kubernetes, SRE, HomePage

Creating an SSD persistent volume in Google Kubernetes Engine

The official documentation doesn't mention (at the time of writing) how to add an SSD PV. This post details how to do that
Mansoor A
Mansoor A
1 min read
Quick Notes

Checking SNI SSL certificate expiry in Linux/Mac

When using openssl to connect to a server that's using SNI, you need to use the servername option
Mansoor A
Mansoor A
1 min read
Kubernetes, Google Cloud

Debugging in Google Container Engine nodes

Google Kubernetes Engine nodes do not have a package manager to install debug tools. You need to use `toolbox` for that
Mansoor A
Mansoor A
1 min read
Google Cloud, HomePage

How to mount a Google Cloud Bucket in Linux

Easily mount a Google Cloud Storage bucket in a Linux file system using gcsfuse and use it as if a local disk attached
Mansoor A
Mansoor A
2 min read
HomePage

Enable SSH in Raspberry Pi without a monitor

If you are trying to setup your Raspberry Pi ( Running Raspbian ) without a monitor, you might be in for a surprise. Well, the new Raspbian versions do not have SSH enabled by default, and for good reason. Most people who setup a RaspberryPi do not even change the default password and they connect it to the internet. And these RaspberryPis become part of a botnet in no time. Anyways, let's see how to enable SSH. Enable SSH in Raspbian 1. Prepare the SD card with Raspbian 2. Connect
Mansoor A
Mansoor A
1 min read

Using cron in Docker containers ( Kubernetes )

When it comes to Docker containers, even a simple task can be pretty confusing, like the cron jobs. I know it was confusing for me at least. And I had to spent a lot of time scratching my head because my cron job just won't start. Backstory Before we dive into how to setup the cron daemon to work with Docker containers, let's look into a problem I ran into AFTER setting up the cron in Docker, in Kubernetes running on Google Container Engine. This will be particulary helpful to those who managed
Mansoor A
Mansoor A
3 min read

Could not push Docker images to Google Container Registry

Today I updated the Docker daemon on my Mac ( Running macOS Sierra ) and after that, I just could not push any images to Google Container Registry. It fails with the following message ➜ gcloud docker -- push asia.gcr.io/my-project/my-image ERROR: Docker CLI operation failed: Error response from daemon: login attempt to https://appengine.gcr.io/v2/ failed with status: 404 Not Found ERROR: (gcloud.docker) Docker login failed. Luckily, the fix was simple enough. Click on the Docker icon >> Pr
Mansoor A
Mansoor A
1 min read
HomePage

Installing WordPress in Docker using Nginx and Php-Fpm 7

It is evident that you don't need an introduction to Docker, WordPress or Nginx. So there is no point whatsoever in blabbering about each of these technologies, let's just jump right into the matter. In this article, we will be looking into how you can setup a WordPress site in a Docker container that will be using Nginx along with php7-fpm. What's included in this Dockerfile? The Docker image you create using the following Dockerfile will have the following * Ubuntu 16.04 * Nginx (latest a
Mansoor A
Mansoor A
1 min read

Logging in Golang using logrus

If you just started out with Golang, you'd find it a bit difficult to handle logging with the default pacakge log Don't get me wrong, it's powerful and all, but for a beginner, you have to do a lot of stuff manually. For example, it doesn't have log levels like Info, Warning, Debug, Error by default. You have to add them manually. If you come from a language like Python (like me), you would find it a bit different. Anyway, logrus to the rescue. Logrus [https://github.com/sirupsen/logrus] is a
Mansoor A
Mansoor A
2 min read