I'm really excited about thinkeys, an amazing project by moduloindustries. It's worth exploring!
Archive
All published posts
Trim unused git branches
What is if __name__ == "__main___", and how do I use it.
When a python module is called it is assigned the __name__ of __main__ otherwise if it’s imported it will be assigned the __name__ of the module.
Let’s create a module to play with __name__ a bit. We will call this module nodes.py. It is a module that we may want to run by it’self or import and use in other modules.
#!python # nodes.py if __name__ == "nodes": import sys import __main__ print(f"you have imported me {__name__} from {sys.modules['__main__'].__file__}") if __name__ == "__main__": print("you are running me as main")
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.
...
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.
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 ~/work and ~/git.
rm -rf ~/projects mkdir ~/projects ln -sf ~/work/* ~/projects ln -sf ~/git/* ~/projects
⚠ 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.
...
I recently discovered delta by dandavison, and it's truly impressive.
Just starred monkeytype by monkeytypegame. It's an exciting project with a lot to offer.
Check out ntangle.nvim by jbyuki. It's a well-crafted project with great potential.
If you're into interesting projects, don't miss out on termopen.vim, created by fabi1cazenave.
karimknaebel has done a fantastic job with nvim-lspinstall. Highly recommend taking a look.
I'm impressed by nvim-lspinstall from kabouzeid.
Looking for inspiration? dotfiles by Conni2461.
How to Install micromamba on linux (from the comamnd line only)
I really like using conda (miniconda) 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.
from their readme
Mamba is a reimplementation of the conda package manager in C++.
...
Check out nvim-treesitter and their project nvim-treesitter-textobjects.
telescope-project.nvim by nvim-telescope is a game-changer in its space. Excited to see how it evolves.
I came across lspsaga.nvim from nvimdev, and it's packed with great features and ideas.
rmagatti has done a fantastic job with auto-session. Highly recommend taking a look.
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 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.
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.
...
I'm impressed by onebuddy from Th3Whit3Wolf.
I'm impressed by awesome-streamerrc from awesome-streamers.
If you're into interesting projects, don't miss out on telescope-fzf-native.nvim, created by nvim-telescope.
kedro replit
I am trying to see what an embeded replit
Looking for inspiration? ltreesitter by euclidianAce.
I'm impressed by hop.nvim from hadronized.
I'm impressed by gitmux from arl.
Check out bidict by jab. It's a well-crafted project with great potential.
photopea by photopea is a game-changer in its space. Excited to see how it evolves.
I'm really excited about lolcat, an amazing project by tehmaze. It's worth exploring!
I'm really excited about bubbles, an amazing project by charmbracelet. It's worth exploring!
Check out charmbracelet and their project lipgloss.
plenary.nvim by nvim-lua is a game-changer in its space. Excited to see how it evolves.
Pytest capsys
Testing print/log statements in pytest can be a bit tricky, capsys makes it super easy, but I often struggle to find it.
capsys is a builtin pytest fixture that can be passed into any test to capture stdin/stdout. For a more comprehensive description check out the docs on capsys
Simply create a test function that accepts capsys as an argument and pytest will give you a capsys opject.
I'm impressed by kedro-diff from WaylonWalker.
I like ThePrimeagen's project git-worktree.nvim.
Check out nvim by kuator. It's a well-crafted project with great potential.
Looking for inspiration? awsimple by jamesabel.
Building Rich a Dev Server
Draft Post
I’ve really been digging @willmcgugan’s rich library for creating TUI like interfaces in python. I’ve only recently started to take full advantage of it.
I am working on a project in which I want to have a dev server running continuously in the background. I really like dev servers theat automatically chooose an unused port and list out the running pid so that I can kill it if I need to.
...
Looking for inspiration? telescope.nvim by nvim-telescope.
If you're into interesting projects, don't miss out on harpoon, created by ThePrimeagen.
The work on maggieappleton.com by MaggieAppleton.
Check out tmate-io and their project tmate.
The work on cookiecutter-data-science by drivendataorg.
Site Down During Build
Recently I noticed a new netlify site of mine was down while I was checking to see if new content was live. Later found out this was consistent after each and every push the site would go gown as soon as I hit push, and would not come back until the build finished.
Do other Netlify sites go down during build???
Short Answer NO. All of my google fu lead me to believe I was alone and none of my other sites do this.
...
Kedro pipeline_registry.py
With the realease of kedro==0.17.2 came a new module in the project template pipeline_registry.py. Here are some notes that I learned while playing with this new module.
You should now have something that looks like this in your src/<package-name>/pipeline_registry.py.
"""Project pipelines.""" from typing import Dict from kedro.pipeline import Pipeline def register_pipelines() -> Dict[str, Pipeline]: """Register the project's pipelines. Returns: A mapping from a pipeline name to a ``Pipeline`` object. """ return {"__default__": Pipeline([])}
pipeline_registry only works in
kedro>=0.17.2...
Check out smitajit and their project bufutils.vim.
I like Rigellute's project spotify-tui.
I like swyxio's project technical-community-builders.
Just starred Minyus by Minyus. It's an exciting project with a lot to offer.
I like uranusjr's project simpleindex.
I came across lorenabalan from lorenabalan, and it's packed with great features and ideas.
I came across vim.wasm from rhysd, and it's packed with great features and ideas.