RSSAmplifier

Blog

Vishnu's Blog

vishnugt.comRSS feed ↗16 posts

Latest posts

Why I Blog

“It often happens that two schoolboys can solve difficulties in their work for one another better than the master can. The fellow-pupil can help more than the master because he knows less. The difficulty we want him to explain is one he has recently met. The expert met it so long ago he has forgotten it.” — CS Lewis, The Weight of Glory (quoted in Show Your Work!) I loved that quote. It made a lot…

Free Will

It became obvious within five minutes that my friend was going to lose the chess match to a six-year-old. When the inevitable happened, everyone celebrated the kid. A few moments later, they congratulated the parents too. Interesting. If the kid had been eight years old, would people still congratulate the parents? What about ten? Fifteen? It looks like the kid gets full credit only after a…

Docker vs Host user

By default when we run a process inside a Docker container, it is run as the root user, and that’s all right; after all, we are talking about inside the container, but as far as the host machine is concerned, what user is running the process? Spoiler alert: It is the same root user as on the host. Let’s take a step back and try to understand what’s happening. So I created a fresh VM server and…

File Descriptors

At one point or another we’ve come across a command line that looked something like the following sh program.sh 2>&1 In general we know that it redirects the error stream to the stdout stream, but let’s dive a little bit deeper today. Let’s run a simple sleep process and let’s open another terminal to find the process id with ps aux sleep 5000 ps aux | grep sleep And that should give you an output…

Proxmox Setup

I had decided a long time ago, that when I build my next PC I would make the current PC a server. But I was unclear about how I was gonna go with it, I was thinking of maybe installing Ubuntu on it, and install all the services(maybe all the services in individual dockers) for safety reasons. But then, that’s when my friend introduced me to Proxmox. To put it simply with proxmox we can create…

My 2023 Rig

Configuration: Intel Core i5-13600K Zotac Gaming GeForce RTX 4070 Ti AMP AIRO SPIDER-MAN™ MSI MPG Z790 Carbon WiFi Motherboard Samsung 990 PRO SSD 1TB PCIe 4.0 M.2 G.Skill Trident Z5 RGB 32GB (2 * 16GB) DDR5 6000 MHz Cooler Master ML360L Core ARGB CPU Liquid Cooler Lian Li Lancool 215 X Mid Tower Computer Case Others: Acer Nitro XV340CK P Widescreen 34” Acer Nitro VG271U 27” Logitech MX Master 3…

Traefik setup

Original article link . I love that article, but I find it really time consuming to refer it each time, hence this post. I prefer everyone to read the source article at least once before diving into this article (or continue if you have some idea about Traefik) 1. Docker installation and config: sudo apt-get install docker-ce Verify with sudo docker run hello-world Find the latest version here -…

Rust - Part 4

This article is for those who already have some experience with rust, and want to refresh the concepts. All the articles from this series are condensed versions of Rust official book , t his post covers Chapter 4 from the book. 4. Ownership This is what enables rust to work without Garbage collection, or so they say, let's dive in. 4.1 What is Ownership Heap and Stack: Stack: Remember…

Rust - Part 3

This article is for those who already have some experience with rust, and want to refresh the concepts. All the articles from this series are condensed versions of Rust official book , t his post covers Chapter 3 from the book. 3.1 Variables and Mutability: Variables are immutable by default. The following will throw an error during compile time. fn main() { let x = 5; x = 6; } You can try the…

Rust - Part 2

This article is for those who already have some experience with rust, and want to refresh the concepts. All the articles from this series are condensed versions of Rust official book , t his post covers Chapter 2 from the book. Chapter 2: 1. Setup: Let's create a number guessing game. Let's create a new package and add some print statements. cargo new guessing_game cd guessing_game use std::io; fn…

Rust - Part 1

This article is for those who already have some experience with rust, and want to refresh the concepts. All the articles from this series are condensed versions of Rust official book , t his post covers Chapter 1 from the book. Chapter 1 1. Getting started To install rust $ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh If you are paranoid about executing a random sh file on your…

Favourite Quotes

Includes lines from anime, movies and books It’s going to affect you only as much as you let it affect you - Unknown Men listen closer to calm tones than to the loudest shouts, so long as firmness and certainty accompanied the calm - from Elantris Novel by Brandon Sanderson Pain loses its power when other things become more important. - from Elantris Novel by Brandon Sanderson The best way to keep…

My Rig

General: AMD Ryzen 5 2600 GeForce GTX 1660Ti Gigabyte B450 Aorus M Motherboard Storage: WD SN550 500GB NVMe M2 - Primary OS WD Green 240 GB 2.5” Sata 3 - Secondary OS Seagate Barracuda 2 TB 2.5” - Data drive Others: 2 x BenQ 24” FHD Keychron K2 Hotswappable Logitech G600 MMO Gaming Mouse Photos (with an old keyboard):

Quick Reference

Shortcuts Docker docker exec -it container_name /bin/bash - To log in to the container docker-compose up -d - Detach mode docker-compose down -v - Remove declared volumes docker container run -i -t -p 1000:8000 --rm my_image VS Code Ctrl + K v Open Preview to the side (Extension Required Markdown Preview Enabled) Ctrl + K u Close the preview Ctrl + Shift + K Delets line (Also in Sublime) TMUX…

Initial Linux Setup

Installing tmux I usually spend a lot of time here, to get the perfect setup, something like - tmux + tpm + zsh + tmux-resurrect + zsh autocomplete. This time I’m just going for the vanilla experience, just tmux alone. One of the reasons is I keep finding myself with new OS installs, new temp laptops, new servers, and I can’t afford to set it up in every place, so I’m going to try to limit my…

Software Developer

When I got selected by a multinational software company, I was on cloud nine and I thought I was more than ready to get into the corporate world. Not to brag but since this is important to the context, let me make something clear - I considered myself an above-average coder, I have released a few noob android apps, have won a couple of Hackathons, and have also contributed to some open source. I…