“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…
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…
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…
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…
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…
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 -…
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…
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…
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…
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…
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…
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…
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…
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…