Quick-Tip

Mar 01, 2023

TIL: time travel with Python’s standard library

There are a few different approaches for writing tests for date and/or time-sensitive functionality. One could choose to add a sleep() in the test, which would guarantee that the time passed, but that also has the downside of increasing the run time of the test.

Jun 30, 2021

A caller id for your python function

Most of you might be too young to know this but there was time that the phone in your house - not in your pocket! - would ring and gasp! you had no idea who was calling! You had to ANSWER the phone to find out. :scream:

Feb 13, 2020

Go to line number in a file using vim

You want to see line 3842 of file called my_super_long_file.py and you can only access that file using vim. You open the file and to your dismay, by default, vim doesn’t display line numbers. Here are your options:

Nov 06, 2019

TIL: How to move a line in Vim

For a text like the following: This is the line I want to move. This line should be the first line. In order to move the first line down, in normal mode* (not edit or insert mode), follow these steps:

May 16, 2019

Sending docker container logs to a separate file

In a large web application, the backend logs can get quite verbose: requests created, sent, processed, received, etc. The list can grow large very quickly depending on how logs are implemented.