RSSAmplifier

Blog

Gaganpreet Arora

Recent content on Gaganpreet Arora

gaganpreet.inRSS feed ↗22 posts

Latest posts

Pipe to Bash

Go visit the website any of your favourite AI agent or tool. Navigate to installation instructions. 
 It’s very likely going to be a form of: curl URL | bash or npm i -g . Claude Code, OpenCode, Codex, Pi - all of them. I get it, it’s convenient. 
 Thing is, even if you “trust” the provider, you can’t rule out supply chain attacks. npm is already notorious on…

Microservices

We’ve been expanding the team at DigiUsher. I’ve interviewed dozens of engineers. I noticed a pattern: almost everyone defaults to microservices when conversation moves to system design. When I ask why, the answers are often vague. In my experience, it’s the same set of engineers who haven’t yet been exposed to the overhead of a new microservice. 
 I have yet to see a…

Debugging Wake on Lan

I rely heavily on Wake-on-LAN to wake my desktop and ssh in for working remotely. Last month I ran into an issue; Wake-on-LAN wasn’t working. I had to physically press the button or press a key on the keyboard to wake up my desktop. 
 Over a weekend, I sat down to figure out what was going on. 
 Setting the wake-on flag manually # The Arch Wiki Wake-on-LAN page has a bunch of…

Tools for working with JSON

I often work with JSON responses and need to process, view or compare objects. I have come to depend on a bunch of command line tools for these tasks. Do you use any other tools? Let me know in comments below. 
 View (bat) # bat (better cousin of cat) is perfect for reading syntax highlighted JSON. It’ll use a pager for files that don’t fit on the screen and files can be searched…

Copy to clipboard from tmux on a remote ssh session

Updated in October 2024, to work with Wayland and native OSC-52 support 
 My current working setup is tmux + neovim. On top of that, I use my desktop for development that I often access remotely outside of home. 
 One of the drawbacks of working remotely via SSH was that I couldn’t copy to my client’s native clipboard (eg: to share code snippets in Slack) remotely. 
 OSC-52…

Hyperproductive API clients with FastAPI using OpenAPI Generator

OpenAPI-Generator is a spectacular tool built on top of OpenAPI schemas that can generate API clients from OpenAPI schemas. Coupled with the automatically generated OpenAPI schema in FastAPI, it’s a formidable paradigm to learn. I’ve been using this pattern in some of my recent projects and it’s made me very productive. 
 A working example of this blog post can be found in…

Disable Sony noise-cancellation on Linux

I really like my Sony 1000XM3 headphones. They are super comfortable to wear and pack away compactly when I’m travelling. 
 I have always hated one feature though: the headphones always start with noise-cancelling (NC) enabled. This default setting irritates me because it means I have to charge my headphones more often. In addition, I’ve also had ear fatigue when I use NC for too…

Creating a "Deploy to Heroku" button

Heroku makes it a breeze to deploy applications to the cloud on their free instances. Although it’s straightforward, here are my notes of how I set up the “Deploy to Heroku” button for No Cookie Analytics . 
 Step 1: Choose a Docker image # The No Cookie Analytics comprises separate backend and frontend (SPA) apps. To make the deployment process less complex, I set up a…

Onyx Boox Note Air 2 Review

I take a lot of notes and it was becoming a real headache to organise and revise things I had studied. I’ve been eyeing the e-ink tablet market since Remarkable launched a few years ago. The lack of a backlight and a recently introduced subscription model drove me to go for a Boox Note Air 2 instead. 
 Here’s my experience of using the tablet for 6 weeks. 
 
 


My favourite books of 2021


 
 
 This year I read more non-fiction than I usually do and I read 32 books this year. I also wrote a similar list for 2020 .

What I learnt building a SaaS

Background # It was around the start of the pandemic in 2020 that I started hacking away at some of the ideas that I had collected but didn’t have a chance to work on. I had come across the FingerprintJS project, and I had an idea to use similar fingerprints for a cookie-free analytics platform. At that time, other competitors in this market were still in their infancy, and I wanted to build…

Wikivoyage has disappeared from DuckDuckGo

Update (2021-10-31) : DuckDuckGo now includes results for Wikivoyage again, as do Bing and Yahoo. 
 I have been planning a long due vacation and I was doing some research into the places I wanted to visit. My goto travel guide is Wikivoyage: it’s well organised, text-heavy (instead of slideshow-heavy alternatives) and skimming the guide of a region will generally give a good idea of what…

No escorts allowed: How I fought spammers

Warning: This post features text that might not be safe for work. 
 Background # Incorporating anti-spam measures are the least of concerns while building a user generated content (UGC) platform. Unless you’re paranoid and spend precious time building moderation features in your platform, there will come a day when you sorely miss those tools. This is a story about exactly how this…

Optimising a Vuetify app

Background # I’ve been building No Cookie Analytics in Vue using the Vuetify framework. Most of my time was spent hacking away without any due regard to performance. I looked at the PageSpeed Insights score, which handed out an abysmal score of 29 (out of 100). It was not shocking, I hadn’t spent any time on this part. The app was sluggish and I knew I had to fix it. Here’s my…

Lessons learnt migrating a Flask application to Python 3


 
 
 I recently migrated a medium sized Flask application from Python 2 to Python 3. Python 2 was retired over a year ago and upgrading the app was long overdue. I imagine there are still others who could use my lessons to migrate their apps. 
 Background # A medium sized Flask application, ~20000 LoC running on Heroku with multiple celery workers. The app was already using the…

My favourite books of 2020

Working and living from home gave me a lot of free time that I could dedicate to reading. I read 40 books this year. I usually read fiction, however this year I aimed to read a mix of fiction and non-fiction.

IPython embed and autoreload

IPython makes for very productive and effortless sessions working interactively with Python. From the numerous extensions for IPython, autoreload is one I use often. It’s very useful for working with existing code and being able to edit code from my code editor and have changes reflected automatically within the IPython terminal.

The story of udemy-dl

The recent takedown of the youtube-dl project resurfaced memories of a similar project, udemy-dl, that I worked on years ago. I also had to abandon the project due to a DMCA notice. In light of what happened to youtube-dl this felt like the right time to write about it. 
 Beginnings # Back in 2013 when I was starting off as a software consultant, I landed a project to build a desktop GUI…

Adapting types to fix SQLAlchemy's "can't adapt type" error

I have recently been using Pydantic a lot, which is pretty cool since it lets me specify concrete types on my previously untyped data. 
 Until I ran into an error when I was inserting data stored in a Pydantic model to my postgres database using SQLAlchemy. 
 Problem # I have a Pydantic model like this to define my incoming data from a request:

Fixing crackling audio on USB powered speakers and Raspberry Pi

Powering USB speakers from Raspberry Pi # I recently set up Mycroft (an open source personal assistant) on my Raspberry Pi. I bought a set of cheap speakers which run on USB power and plugged them into the 3.5mm output and the power cable to a USB port on the Pi itself. Right away I heard constant crackling noises coming out of the speakers. I figured I had a set of defective speakers but I could…

Guest post: Better SQLAlchemy and Beyond

I wrote a blog post which was originally published on the Tiqets Tech blog .

Guest post: 10 things learned building our first Shopify App

I wrote a blog post which was originally published on the Shopify blog .