April 14, 2024 | Tags: git TIL

Whenever you clone a repo with --depth <N> in order to not download all the objects in history, if you then try to push it to, in my case, a different remote, you might encounter this error:

[Read more]

Generate Django Secret Key

Aug. 10, 2023 | Tags: django TIL

Every now and again, I need to generate a Django secret key. And I always forget what is the function I have to call, and I end up looking it up every time.

[Read more]

Get current host's local IP

June 24, 2023 | Tags: python networking TIL

Sometimes, when working in a private network, it can be useful to know the current host IP address. If you are in the Linux shell, it can be as easy as using ifconfig and get it from there. However, if you need it in your application or in a script or in a programatic way, it's better to use the socket module from the standard library.

[Read more]

Neovim termguicolors + tmux default-terminal

June 8, 2023 | Tags: tmux TIL

Today, after a long while of having known the wrong configuration for the colours to look alright in and out of tmux along with neovim's termbuicolors feature, And I did not realise that the solution was right in from of me this whole time.

[Read more]
1 2 3