Technology (⊙_⊙')
Consuming APIs responsibly / Nov 2022
Or: Etiquette and table manners for pinging other people's servers.
Create a series of posts with navigation in Jekyll / Feb 2022
Add Jekyll posts into a series with series navigation.
A practical guide to light and dark mode in Bootstrap 5 and Jekyll / Jan 2022
Implementing light and dark mode on your Bootstrap 5 + Jekyll website.
Nemo - The Ubuntu file manager you didn’t know you needed / Jan 2022
Celebrate 2022 with a shiny new file manager for Ubuntu!
Announcing Fediverse.to! / Jan 2022
I've been working on a search engine for Fediverse instances!
Easy pretty URL redirects with Jekyll and Netlify / Nov 2021
Combine Jekyll and Netlify to create pretty URL redirects as easy as 1-2-3.
Linking Jekyll pages back to their Git source code / Nov 2021
Add a link back to the public Git hosting link for any static Jekyll blog.
Optimising JPG and PNG images for a Jekyll website / Nov 2021
Use CLI tools to generate resized and optimised thumbnails for articles header images.
Quick and easy client-side JavaScript search with Lunr.js / Nov 2021
Display search results from any JSON data object in the browser using Lunr.js.
Creating light and dark themes for websites the right way using prefers-color-scheme / Oct 2021
Blur the line between desktop and web by letting the OS style your website or webapp.
Make Linux apps for Notion, Mastodon, or any web app using Nativefier / Oct 2021
Notion is an awesome life manager. And Mastodon is great for decentralised internet shenanigans. With Nativefier, I can now enjoy them as apps on Ubuntu 20.04.
Inserting dynamic data into Jekyll static sites using Python or Bash / Oct 2021
Auto-generate Jekyll configuration files with content and avoid creating an API backend.
Introduction to Ansible / Aug 2021
Ansible is the answer to custom scripts and tooling that eventually snowball into a kludge which breaks more things than it fixes.
Introduction to YAML / Aug 2021
What is YAML and why is it about time we started using it?
Introduction to Jekyll / Aug 2021
Jekyll is a framework for building websites - write your content in Markdown, use HTML/CSS for structure and presentation, and Jekyll compiles it all into static HTML. No servers. No backends. No fuss.
Multi-machine Setup and Configuration with Vagrant / Aug 2021
If you ever need to test an app and a database, did you know you can use Vagrant to bring up multiple testing machines at once? Here's how.
Provisioning with Vagrant / Aug 2021
Ansible works well to provision a Vagrant box with everything installed from the get-go.
Introduction to Vagrant / Aug 2021
Vagrant helps you run other operating systems on your computer, meaning you can build things, test things, and do crazy shit without blowing up your own system.
A Guide to Web Scraping in Python using BeautifulSoup / Aug 2021
Web-scraping is a useful but often neglected technical skill. The BeautifulSoup library in Python makes extracting HTML from web pages easy. Do with that what you will ;)
Using variables in Jekyll to define custom content / Aug 2021
I recently discovered that Jekyll's config.yml can be used to define custom variables for reusing content. I feel like I've been living under a rock all this time. But to err over and over again is human.
The evolution of ayushsharma.in: Jekyll, Bootstrap, Netlify, static websites, and responsive design. / Jul 2021
In this article, I'll highlight some ideas for Jekyll collections, blog category pages, responsive web-design, and netlify.toml to make static website maintenance a breeze.
5 key best practices for sane and usable Terraform setups / Jul 2021
These are the top 5 lessons I've learned after 5 years of Terraform-ing.
Terraform + Helm: A match made in heaven/hell? / Jul 2021
I've just discovered that Terraform can deploy Helm Charts as well. But I'm not sure if I like it.
Automating ArgoCD using ArgoCD! / Jul 2021
In this tutorial, I will show you how to automatically create multiple Applications in ArgoCD using ArgoCD!
Getting started with ArgoCD / Jul 2021
In this post we meet ArgoCD: a simple pull-based GitOps deployment tool which syncs K8s manifest files with a cluster for easy and no-nonsense deployments.
Creating ready-to-use AWS Security Groups using Terraform Registry, Named Groups, and Named Rules / Sep 2020
Create parameterized AWS security groups quickly and consistently with Terraform Registry.
Creating AWS VPCs in 2 minutes with Terraform Registry / Sep 2020
Create parameterized AWS VPCs quickly and consistently with Terraform Registry.
Configuring Elasticsearch snapshots using SLM on Google Compute Engine / Jun 2020
A tutorial on how to configure automatic snapshots of Elasticsearch using the in-built Snapshot Lifecycle Manager on Google Compute Engine.
Working From Home and Software Engineering / Jun 2020
Your time and attention is your primary resource, so deploy it wisely.
The Virus 😷 and the Cloud ⛅: Tips on AWS cost-saving in these weird 🤯 times / Apr 2020
2020 is the year startups are trying to save aggresively on cloud spend. I list down some key learnings based on my experience.
Replicating Bitbucket Pipelines on your laptop for local debugging / Mar 2020
I love Bitbucket Pipelines, and debugging them on your laptop is even easier thanks to Docker containers. I'll show you how to debug Serverless deployments and diagnose broken builds.
Cloning another Bitbucket repository in Bitbucket Pipelines / Feb 2020
I'll show you how to allow one Bitbucket repo to clone another during a Pipeline build.
Deploying git submodules in Bitbucket Pipelines / Feb 2020
Git submodules makes it easy have repos for common dependencies, but how to actually clone them in your Bitbucket Pipeline?
Automating Amazon Elastic Container (ECR) container builds using Bitbucket Pipelines / Aug 2019
I'll show you how to build a Docker image in a Pipeline and push it to a container registry, in this case Amazon ECR.
Taming AWS costs with Cost and Usage Reports + AWS Athena / Aug 2019
AWS Cost & Usage Reports with AWS Athena are vital for understanding cloud spend. I'll show you some handy Athena queries to break things down.
Exporting Bitucket repositories and Pipelines with Python / Jun 2019
Bitbucket doesn't offer a dashboard yet, or an easy way to fetch information for all your repos and Pipelines. So I wrote a handy Python script for the job. It's great for configuring alerts or building near-real-time dashboards!
Rediscovering Logo with Bob the turtle / Jun 2019
My very first programming language was Logo! I can still remember guiding that fuzzy little on-screen turtle to draw simple and complex shapes. So I found the Logo Python module and took a walk down memory lane.
Automating Serverless framework deployments using Bitbucket Pipelines / May 2019
The open-source Serverless framework makes it easy to build and deploy Lambda stacks. I'll walk you through deploying Serverless apps automatically using Pipelines.
Automating AWS Lambda deployments using Bitbucket Pipelines and Bitbucket Pipes / May 2019
Pipes is another great Continuous Delivery feature in Bitbucket: pre-built, ready-to-use, and parameterized deployment jobs.
Algorithms in Python: Exchange Sorts / Mar 2019
Notes on implementing the basic Exchange sort algorithms in Python.
The Three Ways of DevOps: Notes on The Phoenix Project / Jan 2019
The Phoenix Project is one of the most approachable books for DevOps available today. Highly recommended, especially if you don't already know Conway's Law.
Working with NumPy in Python / Oct 2018
My Udacity Python Nanodegree introduced using NumPy to handle large arrays and datasets in Python. I put some notes togther for referencing later.
Data Types in Python / Sep 2018
Some quick notes describing the basic data types in Python3 and their features.
Dockerizing Tweet-Toot: A practical guide to deploying your app using Docker / Sep 2018
Tweet-Toot is my personal project, a Twitter relay for the Mastodon social network. I recently dockerized the setup and put these notes together to explain the process.
SublimeText 3 setup for Jekyll development / Sep 2018
SublimeText has some cool plugins for setting up a basic Jekyll development environment. Take a look.
Gartner's Magic Quadrants: A summary of cloud Infrastructure-as-a-Service providers over the last 5 years / Sep 2018
Gartner's Magic Quadrants was one of the the first industry reports I read which covered where the cloud vendor's were headed and what their strengths and weaknesses were. I took some time to consolidate the Gartner findings over the last 5 years for comparison.
Tweet-Toot: Building a bot for Mastodon using Python / Sep 2018
I joined the Mastodon social network in 2016 and felt a need for building a Twitter relay. We all left the birdsite for many reasons but not the people we met. So this project is a way to bring some of them over to Mastodon, in practice if not in spirit.
Moving from CloudFlare to StackPath / Jul 2018
I love Cloudflare, but after facing some issues with TTFB I decided to move to StackPath, which proved to be a lot faster and feature-rich.
Understanding vendor lock-in and breaking the cycle / Jul 2018
I went through one of Gartner's reports, and it says the key to breaking vendor lock-in is to commit fully to a single technology vendor, be it a cloud software provider, a social network, or our favorite sharing app. It seems controversial on the surface, but I wanted to jot down some quick notes. Maybe the approach is worth experimenting with?
Rolling clusters for deployment with Terraform / Jul 2018
Terraform enables more than infrastructure provisioning, you can even use it for deployments. Combine it with Packer, and you can have a very powerful immutable rolling deployment pipeline.
Working with Terraform Modules / Jul 2018
Terraform's Modules feature allows quickly building re-usable infrastructure templates to provision cloud environments repeatably. These notes will help set up a basic application for high-availability.
Getting started with Terraform / Oct 2017
A basic walkthrough of Terraform, the open-source, cloud-agnostic IaC tool by HashiCorp, the makers of Vagrant.
Upgrading to HTTP/2 / Sep 2017
It's about time we all move our web properties to HTTP/2. I list down some gotchas for those looking to migrate.
HTTP security headers: Referrer-Policy / Sep 2017
The web is a collection of inter-connected pages. This means chances are good that someone landing on your website is coming from another one, and when they leave your website, they take a lot of identifiable information with them. HTTP/2 allows you to control what happens to the referrer information when users leave your website.
HTTP security headers: X-Content-Type-Options / Sep 2017
HTTP/2 introduced a new feature which basically just turns off an old default feature: the browser's hankering for figuring out the content type of a resource. Why and how should we turn it off?
HTTP security headers: X-Frame-Options / Sep 2017
Inline-frames enable very basic phishing attacks. You can just include a bank's main website within your own website and lure the user to handover their passwords. HTTP2/ comes with built-in protection against this kind of threat.
HTTP security headers: HTTP-Strict-Transport-Security / Sep 2017
HSTS is a security feature which prevents users from accessing your website over non-secure HTTP. It comes with HTTP/2, is easy to turn on, but very hard to turn off. Here's the why and how.
HTTP security headers: X-XSS-Protection / Sep 2017
HTTP/2 comes with built-in protection for XSS. Here's what it does and how to turn it on.
HTTP security headers: Content-Security-Policy / Sep 2017
HTTP/2's CSP let's you define a white-list of what's allowed and what's blocked on your website. This lets browsers block third-party trackers which try to annoy/harm your users. Here's the why and how.
I'm killing Disqus comments on my blog. Here's why. / Sep 2017
I added the Disqus commenting platform to my blog some time ago. And then I found out that it was loading WAY TOO MANY tracking cookies inline and profiling my website users. This is how you build Orwellian software. And shitty software.
Posting messages to Slack using incoming webhooks and Python3 Requests API / Sep 2017
Slack has become a favorite of DevOps/SRE teams across the globe. It's a very easy-to-use and programmatic messaging platform. Here's the quick and easy process to posting messages to your Slack group from Python.
Using Packer and Ansible to create immutable servers, deploying code, and recycling instances / Sep 2017
Packer is an amazing golden image builder. Ansible is a great deployment tool. So let's use them together!
Getting started with Packer / Sep 2017
Packer. Basically Docker for whole VMs. Another great tool by HashiCorp, this one modernises an old formula but retains the simplicity. Building immutable servers was never this easy.
The different ways I've deployed code over the years: the road to Immutable Servers / Sep 2017
I took a walk down memory lane to try and figure out how much my daily work has changed. The concepts are still the same, but the tools have become bigger, because our needs have shifted dramatically over the years.
Testing AWS Elastic Load Balancer health check endpoints with Python / Sep 2017
A quick script for ad-hoc health-checking of load balancer instances.
Complete Nginx Monitoring with Collectd and InfluxDB / Aug 2017
I recently discovered InfluxDB as a great write-heavy database for storing metrics. These are my notes on monitoring the golden signals in Nginx using Collectd and InfluxDB.
Deploying Jekyll blog automatically using Bitbucket Pipelines / Aug 2017
Because why not? Here's how to build your Jekyll website and deploy it to a VM of your choice.
Migrating MySQL database tables to InfluxDB / Aug 2017
If you ever need to migrate a MySQL database to InfluxDB, say if you were using MySQL as a metrics database because you were too busy not knowing Influx even existed, then this handy Python script can do the job and take care of schema migrations too.
Backing up InfluxDB databases to S3 / Aug 2017
A handy bash script to backup your InfluxDB database to AWS S3; great for cron jobs.
Setting Up Grafana to use Collectd and InfluxDB / Aug 2017
Grafana provides out-of-the-box support for InfluxDB, so visualising the metrics you're collecting using Collectd, etc., is straightforward. Here's how to do it.
Setting up Collectd and InfluxDB on Mac OS X / Aug 2017
A quick copy-paste-able process for installing Collectd and InfluxDB on your Mac for some local testing.
Getting Started with time-series data using InfluxDB / Aug 2017
A quick comparison of relational vs time-series databases, followed by a brief hands-on tutorial for InfluxDB on a local Mac OS.
Getting started with server metrics collection with Collectd / Aug 2017
Collectd, a C-based daemon, is a fast and lightweight metrics shipper.
Retry Strategies for Transient Failures / Aug 2017
A very basic reality of computer networking is that... it fails. And when it does, there are ways to retry your connections to make life easier for you and other clients as well.
Using Route 53 as a Load Balancer / Aug 2017
AWS Elastic load balancers do their job well, but they can get pricey. So naturally I tried using Route53 for load balancing traffic. It was a lot harder than I thought, and while this experiment didn't succeed, I'm noting my approach here for better luck next time.
MySQL Database backups to S3 / Aug 2017
A handy bash script to backup all MySQL databases to AWS S3.
Mastodon Users and Instances in Sqlite3 Using Python / Apr 2017
The title really says it all: exporting data from JSON and ingesting into Sqlite3.
The Ultimate Guide to Using Mail in Linux / Apr 2017
I installed mutt to send email from the command-line. It's fast and the CLI switches are memorable. Worth a look if you use the CLI for sending emails a lot.
Fixing ValueError('unknown locale: %s' % localename) in Python / Mar 2017
You get 3 guesses for what the solution could be...
Getting Started with Xinetd / Mar 2017
Xinetd is a light-weight and straightfoward HTTP server. Not as powerful as Nginx, but it's great for simple things like configuring health checks.
Getting City, Country and ISP of an IP address using Maxmind GeoIP / Mar 2017
The Maxmind GeoIP database is useful for looking up the country and ISP information for an IP address.
AWS, GCS, Azure and Digital Ocean incidents by service in 2016 / Mar 2017
I pulled the data for technology incidents for the major cloud services. The findings were pretty interesting.
I Have Something to Say II / Mar 2017
These have been the confessions of a firefighter who ignored the smoke.
Using Weighted, Geo and Fail-over Routeing in Route 53 / Mar 2017
At work, one of my recent projects involved setting up a multi-region failover with weighted-routing support. Thankfully, Route53 has all of these built-in. Here's how to do it.
You still might need a staging server in 2017 / Mar 2017
It's 2017 and the cloud has matured by leaps and bounds. So do we still need staging servers?
AWS, GCS, Azure and Digital Ocean incidents in 2016 / Mar 2017
I pulled the data for technology incidents on the major cloud platforms. The findings were pretty interesting.
I Have Something to Say / Mar 2017
Ten years from now, if or when I am in another job, no one is going to care whether I ran my production servers with my heart and soul. They will care if I saved money, they will care if I ran it efficiently, but you can do those things while still compromising your values.
Connecting VPCs in 2 AWS Regions (Site-to-site VPN) / Feb 2017
A step-by-step guide for connecting 2 AWS VPSs using self-hosted StrongSwan VPNs.
Installing PHP 7 FPM + MySQL 5.7 + Nginx 1.10 on Ubuntu 16.04 / Feb 2017
These are instructions for installing PHP7, MySQL 5.7 and Nginx 1.10 on Ubuntu 16.04. Very copy-paste-able.
Working with Logical Volume Manager (LVM) / Feb 2017
Some notes on Logical Volume Manager. What it is, why it is, and how to use it.
Fiddling with Logrotate / Jan 2017
Logrotate is one of those built-in Linux things that we don't use often enough. Rotating logs, archiving them to S3, pushing them to some remote server/endpoint, etc. It's all doable with Logrotate.
AWS Route 53 Notes / Jan 2017
Route53: what, why, how, why not.
AWS EBS Types Read/Write Benchmarks / Jan 2017
I ran hdparm and dd on GP2, PIOPS, SC1, ST1, and Magnetic EBS volumes. Check out the results.
Logging AWS spot instance termination / Oct 2016
AWS spot instances provide 90% savings over on-demand servers. The downside? AWS can yank them whenever they want and you have 2 minutes to back things up. How do you know when the starting pistol fires?
Decompressing request using GZIP with Nginx / Oct 2016
If you're using a Lua module with Nginx, then decompressing GZIPped data requires some extra handling.
Compressing output using GZIP with PHP 5.3 / Oct 2016
It's pretty hard to compress output with GZIP in PHP 5.3, but in case you ever need to, here's how.
Introduction to Load-balancing with Nginx / Aug 2016
I'll explore the basics of self-hosted load-balancing with Nginx using a convenient testing setup using Vagrant.
Reading JWT token in Phalcon / Aug 2016
Here's how to read a response JSON web token in PHP Phalcon.
Setting Custom 404 Controller in Phalcon / Aug 2016
After CodeIgniter, Phalcon was the second PHP framework that I used. Blazingly fast and easy-to-use, one of the first things I did was create a custom 404 response controller.
DNS Record Types / Aug 2016
A quick guide to the different DNS record types.
Securing Nginx with Let's Encrypt Free SSL Certificate / Aug 2016
Let's Encrypt is the self-hosted, industry-standard method of generating SSL certificates for your applications. If you're still paying for SSL certificates you're doing it wrong.
Vertical Scaling vs Horizontal Scaling / Aug 2016
The differences between vertical and horizontal scaling may be simple, but they're critical to using cloud technologies effectively.
Essential VIM Keyboard Shortcuts / Aug 2016
A quick guide of essential VIM shortcuts.
Notes on AWS SQS / Aug 2016
AWS SQS: what, why, how, why not.
MySQL Physical Backup with Innobackupex / Aug 2016
Innobackupex, part of Percona Xtrabackup, can perform physical backups of your MySQL databases.
Introduction to MySQL Partitioning / Aug 2016
MySQL partitioning basics: what, why, and how.
Introduction to Fluentd / Aug 2016
The legacy logging infrastructure we have to deal with today was designed for humans and not machines, so a lot of effort is wasted trying to make backend systems understand log data.
NANO Keyboard Shortcuts / Aug 2016
A quick reference of NANO shortcuts.
JSON Web Tokens / Aug 2016
The following document assesses the possibility of using JWT (pronounced "jot") as a token exchange mechanism for APIs.
Hello @World / Aug 2016
Hello, World, you little blue thing...