<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Gaganpreet Arora</title>
    <link>https://gaganpreet.in/</link>
    <description>Recent content on Gaganpreet Arora</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Wed, 15 Nov 2023 23:14:52 +0100</lastBuildDate><atom:link href="https://gaganpreet.in/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Tools for working with JSON</title>
      <link>https://gaganpreet.in/posts/json-tools/</link>
      <pubDate>Wed, 15 Nov 2023 23:14:52 +0100</pubDate>
      
      <guid>https://gaganpreet.in/posts/json-tools/</guid>
      <description>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&amp;rsquo;ll use a pager for files that don&amp;rsquo;t fit on the screen and files can be searched by using the / operator.</description>
    </item>
    
    <item>
      <title>Copy to clipboard from tmux on a remote ssh session</title>
      <link>https://gaganpreet.in/posts/tmux-ssh-remote-clipboard/</link>
      <pubDate>Wed, 08 Feb 2023 22:39:37 +0100</pubDate>
      
      <guid>https://gaganpreet.in/posts/tmux-ssh-remote-clipboard/</guid>
      <description>Note: A better approach is documented in this blog post by Igor Babuschkin.
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&amp;rsquo;t copy to my client&amp;rsquo;s native clipboard (eg: to share code snippets in Slack) remotely.
It took me some time to figure out how to do it, and it&amp;rsquo;s quite straightforward.</description>
    </item>
    
    <item>
      <title>Hyperproductive API clients with FastAPI using OpenAPI Generator</title>
      <link>https://gaganpreet.in/posts/hyperproductive-apis-fastapi/</link>
      <pubDate>Mon, 30 May 2022 15:48:25 +0200</pubDate>
      
      <guid>https://gaganpreet.in/posts/hyperproductive-apis-fastapi/</guid>
      <description>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&amp;rsquo;s a formidable paradigm to learn. I&amp;rsquo;ve been using this pattern in some of my recent projects and it&amp;rsquo;s made me very productive.
A working example of this blog post can be found in this bare-bones Github project .
If you are looking for a real world example using this pattern, you can look at my FastAPI-Starter project, which is a Cookiecutter project that uses this pattern and tons of other helpful features.</description>
    </item>
    
    <item>
      <title>Disable Sony noise-cancellation on Linux</title>
      <link>https://gaganpreet.in/posts/toggle-sony-noise-cancellation/</link>
      <pubDate>Thu, 07 Apr 2022 23:44:17 +0200</pubDate>
      
      <guid>https://gaganpreet.in/posts/toggle-sony-noise-cancellation/</guid>
      <description>I really like my Sony 1000XM3 headphones. They are super comfortable to wear and pack away compactly when I&amp;rsquo;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&amp;rsquo;ve also had ear fatigue when I use NC for too long. [0]
Sony provides no way to change this default (they would rather add gamification to their mobile app).</description>
    </item>
    
    <item>
      <title>Creating a &#34;Deploy to Heroku&#34; button</title>
      <link>https://gaganpreet.in/posts/deploy-to-heroku/</link>
      <pubDate>Tue, 25 Jan 2022 21:52:48 +0100</pubDate>
      
      <guid>https://gaganpreet.in/posts/deploy-to-heroku/</guid>
      <description>Heroku makes it a breeze to deploy applications to the cloud on their free instances. Although it&amp;rsquo;s straightforward, here are my notes of how I set up the &amp;ldquo;Deploy to Heroku&amp;rdquo; 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 monolith Docker image where the backend served static assets.</description>
    </item>
    
    <item>
      <title>Onyx Boox Note Air 2 Review</title>
      <link>https://gaganpreet.in/posts/onyx-note-air-2-review/</link>
      <pubDate>Sun, 23 Jan 2022 17:53:40 +0100</pubDate>
      
      <guid>https://gaganpreet.in/posts/onyx-note-air-2-review/</guid>
      <description>I take a lot of notes and it was becoming a real headache to organise and revise things I had studied. I&amp;rsquo;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&amp;rsquo;s my experience of using the tablet for 6 weeks.
Unboxing # The first thing I noticed as I was unboxing was that the pen nib was bent and crushed (see update at end of this section).</description>
    </item>
    
    <item>
      <title>My favourite books of 2021</title>
      <link>https://gaganpreet.in/posts/books-of-2021/</link>
      <pubDate>Tue, 28 Dec 2021 22:58:45 +0100</pubDate>
      
      <guid>https://gaganpreet.in/posts/books-of-2021/</guid>
      <description>&lt;p&gt;
&lt;img  src=&#34;https://gaganpreet.in/images/2021/books-of-2021-cover.jpg&#34; alt=&#34;Sunset from the Lighthouse of Genoa&#34;  /&gt;
&lt;/p&gt;
&lt;p&gt;This year I read more non-fiction than I usually do and I read 
&lt;a href=&#34;https://www.goodreads.com/user/year_in_books/2021/7515314&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;32 books&lt;/a&gt;
 this year. I also wrote a similar 
&lt;a href=&#34;https://gaganpreet.in/posts/books-of-2020/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;list for 2020&lt;/a&gt;
.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>What I learnt building a SaaS</title>
      <link>https://gaganpreet.in/posts/lessons-learnt-saas/</link>
      <pubDate>Mon, 29 Nov 2021 22:26:02 +0100</pubDate>
      
      <guid>https://gaganpreet.in/posts/lessons-learnt-saas/</guid>
      <description>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&amp;rsquo;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 an analytics product that will have more information for marketeers to base business decisions on.</description>
    </item>
    
    <item>
      <title>Wikivoyage has disappeared from DuckDuckGo</title>
      <link>https://gaganpreet.in/posts/duckduckgo-wikivoyage/</link>
      <pubDate>Tue, 26 Oct 2021 12:43:04 +0200</pubDate>
      
      <guid>https://gaganpreet.in/posts/duckduckgo-wikivoyage/</guid>
      <description>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&amp;rsquo;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 to expect.
So imagine my surprise when I enter a query with the keyword &amp;ldquo;Wikivoyage&amp;rdquo; on DuckDuckGo:</description>
    </item>
    
    <item>
      <title>No escorts allowed: How I fought spammers</title>
      <link>https://gaganpreet.in/posts/build-content-moderation/</link>
      <pubDate>Mon, 18 Oct 2021 16:28:37 +0200</pubDate>
      
      <guid>https://gaganpreet.in/posts/build-content-moderation/</guid>
      <description>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&amp;rsquo;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 happened and how I dealt with it at Polarsteps.</description>
    </item>
    
    <item>
      <title>Optimising a Vuetify app</title>
      <link>https://gaganpreet.in/posts/vue-vuetify-performance/</link>
      <pubDate>Wed, 07 Jul 2021 14:53:00 +0200</pubDate>
      
      <guid>https://gaganpreet.in/posts/vue-vuetify-performance/</guid>
      <description>Background # I&amp;rsquo;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&amp;rsquo;t spent any time on this part. The app was sluggish and I knew I had to fix it. Here&amp;rsquo;s my before and after scores with the steps I took to optimise the app:</description>
    </item>
    
    <item>
      <title>Lessons learnt migrating a Flask application to Python 3</title>
      <link>https://gaganpreet.in/posts/lessons-learnt-python-3-migration/</link>
      <pubDate>Wed, 02 Jun 2021 12:11:26 +0200</pubDate>
      
      <guid>https://gaganpreet.in/posts/lessons-learnt-python-3-migration/</guid>
      <description>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 latest version of Python 2.</description>
    </item>
    
    <item>
      <title>My favourite books of 2020</title>
      <link>https://gaganpreet.in/posts/books-of-2020/</link>
      <pubDate>Thu, 31 Dec 2020 22:34:38 +0100</pubDate>
      
      <guid>https://gaganpreet.in/posts/books-of-2020/</guid>
      <description>&lt;p&gt;Working and living from home gave me a lot of free time that I could dedicate to reading. I read 
&lt;a href=&#34;https://www.goodreads.com/user/year_in_books/2020/7515314&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;40 books&lt;/a&gt;
 this year. I usually read fiction, however this year I aimed to read a mix of fiction and non-fiction.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>IPython embed and autoreload</title>
      <link>https://gaganpreet.in/posts/ipython-embed-autoreload/</link>
      <pubDate>Mon, 07 Dec 2020 21:01:38 +0100</pubDate>
      
      <guid>https://gaganpreet.in/posts/ipython-embed-autoreload/</guid>
      <description>&lt;p&gt;IPython makes for very productive and effortless sessions working interactively with Python. From the numerous extensions for IPython, 
&lt;a href=&#34;https://ipython.readthedocs.io/en/stable/config/extensions/autoreload.html#autoreload&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;autoreload&lt;/a&gt;
 is one I use often. It&amp;rsquo;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.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>The story of udemy-dl</title>
      <link>https://gaganpreet.in/posts/udemy-dl-story/</link>
      <pubDate>Sun, 25 Oct 2020 00:00:00 +0000</pubDate>
      
      <guid>https://gaganpreet.in/posts/udemy-dl-story/</guid>
      <description>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 application.</description>
    </item>
    
    <item>
      <title>Adapting types to fix SQLAlchemy&#39;s &#34;can&#39;t adapt type&#34; error</title>
      <link>https://gaganpreet.in/posts/sqlalchemy-cant-adapt-type/</link>
      <pubDate>Wed, 21 Oct 2020 00:00:00 +0000</pubDate>
      
      <guid>https://gaganpreet.in/posts/sqlalchemy-cant-adapt-type/</guid>
      <description>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:
# Pydantic class class EventSchema(BaseModel): ip_address: IPvAnyAddress Another part in my code defined an SQLAlchemy model to persist this incoming information (along with other data not shown here):</description>
    </item>
    
    <item>
      <title>Fixing crackling audio on USB powered speakers and Raspberry Pi</title>
      <link>https://gaganpreet.in/posts/audio-crackling-raspberry-pi-usb-speakers/</link>
      <pubDate>Wed, 26 Aug 2020 00:00:00 +0000</pubDate>
      
      <guid>https://gaganpreet.in/posts/audio-crackling-raspberry-pi-usb-speakers/</guid>
      <description>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 not reproduce this when I tried the same setup with my laptop.</description>
    </item>
    
    <item>
      <title>Guest post: Better SQLAlchemy and Beyond</title>
      <link>https://gaganpreet.in/posts/better-sqlalchemy-beyond/</link>
      <pubDate>Fri, 31 Jul 2020 00:00:00 +0000</pubDate>
      
      <guid>https://gaganpreet.in/posts/better-sqlalchemy-beyond/</guid>
      <description>&lt;p&gt;I wrote a blog post which was originally published on the 
&lt;a href=&#34;https://medium.com/tiqets-tech/better-sqlalchemy-and-beyond-c2b57d9482ca&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Tiqets Tech blog&lt;/a&gt;
.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Guest post: 10 things learned building our first Shopify App</title>
      <link>https://gaganpreet.in/posts/lessons-build-shopify-app/</link>
      <pubDate>Tue, 09 Jul 2019 00:00:00 +0000</pubDate>
      
      <guid>https://gaganpreet.in/posts/lessons-build-shopify-app/</guid>
      <description>&lt;p&gt;I wrote a blog post which was originally published on the 
&lt;a href=&#34;https://www.shopify.com/partners/blog/build-shopify-app&#34; target=&#34;_blank&#34; rel=&#34;noreferrer&#34;&gt;Shopify blog&lt;/a&gt;
.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
