-
Solving probability problem with code
The Problem Last weekend, as I was casually browsing the CS:GO subreddit for any news related to the game, I found myself in a staring contest with a math problem: Question: A player is holding a Desert Eagle and facing an enemy. Each shot he fires has 50% chance of hitting the enemy. If the shot is accurate, there’s also a 20% chance of hea...
-
Effectively read logs using vanilla vim
TL;DR Glance over the gifs below for tips. Preface As with the motivation for my previous post, I often need to read logs in remote machines or containers. Rather than trying to copy the files to my local computer, it’s easier to open and browse them directly in the remote shell using vim. This article showcases some vanilla vim features (i.e....
-
5 lines I put in a blank .vimrc
TL;DR To make a default Vim installation more useful, type the following 5 lines into its .vimrc file: set hls set ic set is set nu set noswf Or if you prefer, copy and paste the spelled out and annotated version: set hlsearch " highlight all search results set ignorecase " do case insensitive search set incsearch " show incremental s...