Open in app

Sign In

Write

Sign In

Nikhil Vijayan
Nikhil Vijayan

69 Followers

Home

About

Oct 5, 2022

How to download youtube videos using open source software

If you’ve tried to download youtube videos while trying not to download malware, this is for you. Prerequisites You will need to have Docker installed, and know if your terminal uses bash or zsh. All you have to do is use this incantation alias yt-dl='docker run \…

Download Youtube Videos

1 min read

Download Youtube Videos

1 min read


May 1, 2022

Using Gauss summation to add numbers quicker

Gauss summation is essentially an easier way of adding linear numbers in a list without having to iterate over every element. I came across it while reading the impostor’s handbook and wanted to write a quick post about how much more efficient it is. The formula essentially is this: (largest_number…

2 min read

2 min read


Apr 9, 2022

Sending myself text messages with my calendar events for the day

I can be a bit scatterbrained sometimes, and I wanted an easy way to jog my memory about events in the day, so I made a quick and dirty thing that sends me a text message (SMS) with the events for the day. The code To jump straight into the code: https://github.com/nkhil/gcal Architecture …

4 min read

Sending myself text messages with my calendar events for the day
Sending myself text messages with my calendar events for the day

4 min read


Published in JavaScript in Plain English

·Feb 6, 2022

RSA Encryption in Node.js with Code Samples

A guide on RSA Encryption in Node.js with code samples. — Node.js comes with a ‘crypto’ module that helps you create public and private key pairs to use public-key cryptography. Public key cryptography explained: This is a great article I came across that explains it well: RSA Encryption, Decryption and Signing in Node.js (Javascript) - With Examples This post will explain the RSA algorithm, and how we can implement RSA Encryption, Decryption and Signing in Node.js…www.sohamkamani.com

Rsa Encryption

4 min read

RSA Encryption in Node.js with Code Samples
RSA Encryption in Node.js with Code Samples
Rsa Encryption

4 min read


Oct 19, 2021

Normalise whitespace in a string using regex

To normalise a string with extra spaces, for eg: The quick brown fox jumps over the lazy dog To take out extra spaces, here’s the regex you can use: const myString = 'The quick brown fox jumps over the lazy dog' normalisedString = myString.replace(/(\s)\s+/g, '$1') Parenthesis in REGEX are used…

Regex

1 min read

Regex

1 min read


Oct 19, 2021

Generating a private RSA key for tests (Node.js)

I had this use case of creating a private RSA key that is used only when the tests are run. Since the key doesn’t actually need to be valid (as I use mocks)— I use the following approach. It also helps me not commit a random key to source control. …

1 min read

1 min read


Oct 1, 2021

A quick how to on encrypting things using Node’s crypto module

I wanted to document something I had to do recently, which was to encrypt a password using a public key before sending it over the network. Here’s a quick example: const credentials = { clientId: 'client01', password: 'foo', } Let’s say we need to encrypt the password using a 3rd…

1 min read

1 min read


Sep 24, 2021

Enforce that all keys in a map are a key of a certain type (Typescript)

If you’re instantiating a new Map data structure const myMap = new Map() and you want to ensure that every key in this object belongs to a certain type where the key will always be a string (as a Map allows you to set other types as the key as…

1 min read

1 min read


Sep 15, 2021

Convert an OpenSSH key into an RSA PKCS1 format

I’m documenting this since I ran into a couple of snags while trying to convert an open SSH key (that doesn’t play well with Node) into an RSA PKCS1 format in the command line. See this Stack Overflow post for more information and suggestions The snippets below assume your private…

Openssh

1 min read

Openssh

1 min read


Published in Weekly Webtips

·Sep 6, 2021

Offline HTTP status code reference in the command line

I built a tool that lets me look up definitions for HTTP status codes offline and straight from within the command line. I want to give full credit to https://httpstatuses.com/ for a thoroughly useful resource made available without ads. Setup Install the npm module globally npm install -g stts You should…

Http Status Code

3 min read

Offline HTTP status code reference in the command line
Offline HTTP status code reference in the command line
Http Status Code

3 min read

Nikhil Vijayan

Nikhil Vijayan

69 Followers

I like making things.

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech