Beginning on a new Micro-SaaS journey This year, I have decided to finally launch a few products. I've made several products in the past, but I never went ahead with launching them, always waiting for them to be "perfect", or, at least, having a pretty wild definition of "MVP". Some
SSO (Single Sign-on) between web app and Chrome Extension I recently implemented authentication for a Chrome extension, and it was interesting.
Tiny Habits Book Name Tiny Habits Author Dr. BJ Fogg Published 2019 Started Reading 5th May 2022 Finished Reading In Progress
How (and why) to archive web pages The internet is a transient medium of information. Our reliance on the internet is greater than ever, for: Sourcing knowledge - from trivia to information essential to doing our work Entertainment - YouTube videos, Netflix, and eveything in between Staying Connected - With existing friends, making new friendships, finding our
Reflecting on 2020 and Plans for 2021 2020 has been a real roller-coaster of a year for all of us, and it's taught us a lot about ourselves–when you're sitting at home, you can't escape your thoughts. Sure, there were a lot of bad things, but let's focus
Parsing parameters with special characters in Ruby Grape Recently I was building an API where I had to accept URLs as parameters in Grape routes. I URL-encoded the URL, but either my request would hit the wrong route, or it wouldn't capture anything after the second . in the URL, because it tries to parse that as
Using default Rails authentication with a Grape API Recently, I was working on a Chrome extension for a web app where I wanted to share the login state between the extension and the web app. Generally you'd roll with a token-based authentication system or relying on API keys, but neither of those approaches are acceptable if
Considering different strategies for archiving web pages I'm working on a project that has an aspect of archiving web pages for posterity. This is to fight the problem of link rot. There's already sites like archive.org and archive.today. But the problem with them is that they save the content as they
How to learn deep learning on the cheap Deep learning is something that needs a discrete graphics card. Running deep learning programs on a CPU is just too slow, it can take days upon days to run even the most basic deep learning programs on a CPU. Also, CUDA by NVIDIA is what's most often used,
Why I don't blog on Medium anymore - and you shouldn't either I've blogged on Medium in the past, and was at one point even paying them every month for their membership. They have a large network of high quality blogs, all in one place, and they have one of the best writing experiences on the web. But I will
How to use iFramely as a Node library iFramely is a service that can be used to extract data from web pages from meta tags, opengraph tags, twitter cards, and to generate oEmbeds when possible. I've put some examples of the same below. iFramely provides this functionality in a subscription service online, which I'd
How to detect if a page is an article If you've ever used a service like Pocket or Instapaper (Safari and Firefox also provide this, both powered by the now-defunct Readability parser code), you will have used a feature called "Readability" or "Reader View". What is does is that it takes a page,
mkdir -p and file copying in Node.js mkdir -p, wherein you create a directory, including all its parent directories if they don't exist, is functionality that is not provided out of the box by Node, but is required fairly commonly. There's a Node package node-fs-extra that comes to our rescue! To use it:
How to disable console.log in JavaScript Sometimes you might want to disable console.log in JavaScript, because, say, you have a library performing excessive logging, or for any other reason. This is how you can do it: console.log = function () {}; In case you want to preserve the console.log functionality under a different function, you can
Media category classifications There's this very interesting system for classifying the category a piece of text belongs to, called IPTC Media Topics. It helps you determine what subject topic a particular document / text piece belongs to. Here's an example of the hierarchy categorization offered by Media Topics: Media Topics
JavaScript - how to "await" in a callback With ES6, JavaScript has added some powerful new features, one of them being async/await. What async/await basically does is it lets you write asynchronous code that looks like synchronous code, making it much easier to reason about, and saving you from the callback pyramid of doom and promise
Using libraries from one language in another language I was recently faced with a challenge where I was building an application in Ruby, and for one specific task that I wanted to accomplish, there were no libraries for it in Ruby, there were only libraries in JavaScript. Obviously I could not rewrite the entire application in JavaScript for
JavaScript - One language to rule them all! If there is one programming language that you should learn that will cover the highest amount of bases for you, which one should it be? JavaScript, of course! JavaScript is still the only choice you have when building front-end web applications, although WebAssembly is changing that. We have NodeJS, so
web dev Meteor framework review Over the last few years, I've worked extensively with the Meteor web framework. After developing and maintaining a production Meteor application for several years, here's my take on it: The Good Get started quickly Meteor is a really quick framework to get started with. Normally in
Reduce MySQL memory usage for low-end servers Are you trying to run some MySQL based software on a server with low memory (AWS micro, Vultr micro) and keep running out of memory? If you're running this application on a server with very low memory, it's safe to assume you don't have
How to add syntax highlighting to Posthaven I recently gave Posthaven a shot for hosting my blog. While ultimately I decided to go with Ghost instead due to the lack of a few features (syntax highlighting, custom URLs, image headers, markdown support), I tried to dirty my hands and hack together a solution that would allow me
How to copy SSH keys to a server securely I much prefer SSH key authentication to password-based authentication when working with remote servers. One, it's one less password to remember. Two, on your machine, it's automatic. Three, it's more secure. So once you've got your server running, this is how you
web dev Redirect requests to another site using Nginx I recently moved my site from GitHub Pages to my own server. For the last couple of years, I had been hosting my domain asad.pw and www.asad.pw on GitHub pages, and that included my GitHub project sites HeadlessBrowsers and Awesome-Postgres. So far, I had been hosting the
web dev Redirect HTTP requests to HTTPS with Nginx I recently moved my blog away from GitHub pages to Ghost, and had to set up HTTPS redirects for the same. This is how you redirect HTTP requests to HTTPS with Nginx. You will likely have two site configuration files in your /etc/nginx/sites-enabled configuration directory. I have a
SQL How to rename or delete a column in SQLite? I recently worked on a project involving SQLite, and while creating database migrations, I realized that SQLite does not support the complete ALTER TABLE syntax completely. Out of the box, you are able to rename a table, or add a column to an existing table, but that's it.