Cloudflare Integration

I recently tried to move all my DNS records for web resources deployed over the internet to the unified network of cloudflare as they are just great at what they do with all the services and network protection. I will walk through the setup cloudflare to use as nameserver, DNS record management, and SSL/TLS setup. There is plenty more at cloudflare like rate limiting as well. Let’s get this out of the way first Domain Name System (DNS) is a way to translate domain names like blog....

October 29, 2024 · 7 min · 1462 words · Lakshya Singh

Process Management

A process is the entity which gets created for executing the program when we run the following commands in a shell # compile the program by running gcc gcc program.c -o a.out # run the program itself ./a.out Both the above lines lead to execution of two new processes which lead to completion and return the control back to shell. Shell in itself is a process, so how is that a process creates a new process?...

October 13, 2024 · 7 min · 1279 words · Lakshya Singh

Memory Management

Modern programming languages that we work with these days have made memory management simpler that ever, they manage it on their own using things like garbage collectors, smart pointers, ownership, etc. Creating an empty vector is as simple as let empty_vec: Vec<i32> = Vec::new(); But some questions remain unanswered if you haven’t tried manually doing memory operations like: how is a sized vector created using Vec::with_capacity? how is a vector resized on calling pop_back or push_back?...

September 8, 2024 · 7 min · 1419 words · Lakshya Singh

Git Worktree

When you are working in a large code base comprising of multiple micro services maybe in a single repository your work would require you to make progress on multiple features simultaneously. There comes in a lot of context switching which in git terminology means multiple branches. The flow can become cumbersome when you keep stashing and checking out. Let’s see how that looks like. What is the problem? Let’s say I am working on a long term new feature in my freshly checked out branch lakshyasingh/feature-python....

September 1, 2024 · 5 min · 1020 words · Lakshya Singh

Trying is beautiful

I think people these days are more willing to give up and accept circumstances as fate without treading away from the path they are walking on and just trudging along it for eternity. But you know what is one of the most beautiful thing in today’s world? A person willing to fight against the circumstances for something they believe in, for something that won’t let them sleep through night silently, for something that makes them dream in day light....

August 31, 2024 · 2 min · 395 words · Lakshya Singh

MLFQ CPU Scheduling

Multi-Level Feedback Queue algorithm was designed to address problems associated with existing scheduling algorithms i.e. providing a good response and turnaround time resulting in a balanced scheduling algorithm which can cater to a general purpose CPU requirements. It can do so without needing to have any prior information about the executing processes. It develops its knowledge about them on the fly and hence modifying its approach on how to share the CPU time between them....

July 8, 2024 · 6 min · 1221 words · Lakshya Singh

OpenTelemetry Signals

Observability is the ability to measure the internal states of a system by examining its outputs. A good observability system allows to easily identify problem source and troubleshoot them. Observability extends the concept of monitoring by not just telling when something goes wrong but also providing information about why and how. OpenTelemetry is an open standard for telemetry collection that was created as a successor to previously existing standards OpenTracing and Opencensus by Cloud Native Computing Foundation (CNCF)....

July 3, 2024 · 6 min · 1156 words · Lakshya Singh

Reversing Wheel File

Let’s talk about wheel today, definitely hoping it was a ferris wheel but its going to be python’s wheel for now. A wheel file is a relocatable package format for distribution of python packages for easy, quick and deterministic installations. All the packages published on pypi have under their Download files section a tar file and whl file. For example you can head over to Django and download its wheel file which can then be installed simply by doing...

June 14, 2024 · 4 min · 744 words · Lakshya Singh

Beautiful Code

Let’s first try to answer what is software design? From a very basic definition “its the relationship between elements of our software”. Now, the part about good software design is that it creates relationship that provide benefits in terms of cost associated with making changes to system and its overall working. The biggest cost of code is the cost of reading and understanding it, not the cost of writing it....

April 13, 2024 · 8 min · 1537 words · Lakshya Singh

docker run vlsd

Hey you! Yes, you Lightning dev! We heard you were worried about the safety of your user’s funds stored on your Lightning node. It’s a hot wallet after all, and we all know that’s a big no-no for storing large sums of satoshis. That’s why VLS exists. VLS separates Lightning private keys and security rule validation from the Bitcoin Lightning node to a separate, secure signing device. What’s that? “Sounds great, how do I start?...

February 29, 2024 · 4 min · 774 words · Lakshya Singh