Published

All published posts

2667 posts latest post 2026-09-24 simple view
Publishing rhythm
Sep 2026 | 29 posts

What is if name == “main_”, and how do I use it.

When a python module is called it is assigned the of otherwise if it’s imported it will be assigned the of the module. Concrete example # Let’s create a module to play with a bit. We will call this module. It is a module that we may want to run by it’self or import and use in other modules. I have set this module up to execute one of two if statements based on whether the module it’self is being ran or if the module is being imported. Note it is not common to have a block, this is just for demnonstration purposes. running python nodes.py # Running a python script with the command will execute your script top to bottom. This will print out How to Install miniconda on linux (from the command line only) If you don’t already have python installed try using miniconda or replit.com running./nodes.py # You can also simply execute the script from bash if you first set the module to be executable. is only needed one time, even if you edit the file. pipeline.py # Let’s create a second module and…
3 min read

Create a Virtual File Gallery with Symlinks

Creating a directory that is a union of several directories can be achieved with a few symlinks at the command line. Creating a Virtual File Gallery # Here is how I am creating a virtual directory of all my projects that is a combination of both work and not-work projects. I am creating symlinks for every directory under and. ⚠ Notice that first I am recreating the directory each time. This will ensure that any project that is deleted from their actual directory is removed from the virtual gallery. Updating the gallery # Since links are always kept up to date without any extra work, all the data is still in the same place it started. But as new directories are added to any project directory they will not be automatically added to the virtual gallery. cron bashrc/zshrc If you’re concerned about system resources, you can add it to a cron job to run at a regular schedule that makes sense to you. For me, I just popped those 4 lines right in my. It’s a bit overkill, maybe bloat, but it runs…
I recently discovered delta by dandavison, and it’s truly impressive. A syntax-highlighting pager for git, diff, grep, and blame output
Just starred monkeytype by monkeytypegame. It’s an exciting project with a lot to offer. The most customizable typing website with a minimalistic design and a ton of features. Test yourself in various modes, track your progress and improve your speed.
If you’re into interesting projects, don’t miss out on termopen.vim, created by fabi1cazenave. Easy integration of TUI apps in Neovim: Ranger, LF, Tig… Tetris…

How to Install micromamba on linux (from the comamnd line only)

I really like using conda () as my python virtual environment manager of choice. It’s simple and it includes its own python interpreter using the version that I specify at creation. Mamba # from their readme Mamba is a reimplementation of the conda package manager in C++. parallel downloading of repository data and package files using multi-threading libsolv for much faster dependency solving, a state of the art library used in the RPM package manager of Red Hat, Fedora and OpenSUSE core parts of mamba are implemented in C++ for maximum efficiency At the same time, mamba utilize the same command line parser, package installation and deinstallation code and transaction verification routines as conda to stay as compatible as possible. Installing Micromamba # Similar to miniconda micromamba can be installed with a few lines of bash Creating Environments with Micromamba # Creating new environments with micromamba is pretty similar to using conda. -c is required # I was unable to figure out…

Vim Wsl Clipboard

I’ve long used neovim from within windows wsl, and for far too long, I went without a proper way to get text out of it and into windows. wsl has access to cmd applications # wsl can access clip.exe. You can do some cool things with it, such as cat a file into the clipboard, sending output from a command to the clipboard, or set an autocmd group in vim to send yank to the windows clipboard. using clip.exe # Let’s say you want to send a teammate the tail of a log file over chat. You can tail the file into clip.exe. pipe streams of text into clip.exe make it a bit more natural # I recently made mine feel a bit more natural by aliasing it to clip. pop this in your ~/.bashrc or ~/.zshrc yanking to windows clipboard from vim # I use neovim as my daily text editor and its a pain to share code with a teammate over chat, stack overflow, into a gist, or whatever you need. The following snippet has been quite useful and flawless for me. add this to your ~/.vimrc or your ~/.config/nvim/init.vim Ws…