I’m really excited about thinkeys [1], an amazing project by moduloindustries [2]. It’s worth exploring!
Split ortholinear custom replacement keyboard with TrackPoint for ThinkPad laptops.
References:
[1]: https://github.com/moduloindustries/thinkeys
[2]: https://github.com/moduloindustries
Publishing rhythm
Trim unused git branches
Trim branches no longer on origin # [1]
git remote prune origin --dry-run
git remote prune origin
Find branches already merged # [2]
git checkout main
# list remote branches that have already been merged into main
git branch -r --merged
# list local branches that have already been merged into main
git branch --merged
References:
[1]: #trim-branches-no-longer-on-origin
[2]: #find-branches-already-merged
What is if __name__ == "__main___", and how do I use it.
change_speed = (speed) => [...document.querySelectorAll('video')].map(v => v.playbackRate=v.playbackRate+speed)
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.
Concrete example # [1]
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.
Note it is not common to have a if __name__ == "nodes": block, this is just
for demnonstration purposes.
running python nodes.py # [2]
Running a python script with the...
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 # [1]
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.
Updating the gallery # [2]
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 sch...
I recently discovered delta [1] by dandavison [2], and it’s truly impressive.
A syntax-highlighting pager for git [3], diff, grep, and blame output
References:
[1]: https://github.com/dandavison/delta
[2]: https://github.com/dandavison
[3]: /glossary/git/
Just starred monkeytype [1] by monkeytypegame [2]. 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.
References:
[1]: https://github.com/monkeytypegame/monkeytype
[2]: https://github.com/monkeytypegame
Check out ntangle.nvim [1] by jbyuki [2]. It’s a well-crafted project with great potential.
literate programming for neovim
References:
[1]: https://github.com/jbyuki/ntangle.nvim
[2]: https://github.com/jbyuki
If you’re into interesting projects, don’t miss out on termopen.vim [1], created by fabi1cazenave [2].
Easy integration of TUI apps in Neovim: Ranger, LF, Tig… Tetris…
References:
[1]: https://github.com/fabi1cazenave/termopen.vim
[2]: https://github.com/fabi1cazenave
karimknaebel [1] has done a fantastic job with nvim-lspinstall [2]. Highly recommend taking a look.
Provides the missing :LspInstall for nvim-lspconfig
References:
[1]: https://github.com/karimknaebel
[2]: https://github.com/karimknaebel/nvim-lspinstall
I’m impressed by nvim-lspinstall [1] from kabouzeid [2].
Provides the missing :LspInstall for nvim-lspconfig
References:
[1]: https://github.com/kabouzeid/nvim-lspinstall
[2]: https://github.com/kabouzeid
Looking for inspiration? dotfiles [1] by Conni2461 [2].
Current dotfiles and scripts
References:
[1]: https://github.com/Conni2461/dotfiles
[2]: https://github.com/Conni2461
How to Install micromamba on linux (from the comamnd line only)
I really like using conda (miniconda) as my python virtual environment [1]
manager of choice. It’s simple and it includes its own python interpreter
using the version that I specify at creation.
Mamba # [2]
from their readme [3]
---
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 # [4]
Similar to miniconda micromamba can be installed with a few lines of bash
wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
./bin/...
Check out nvim-treesitter [1] and their project nvim-treesitter-textobjects [2].
No description available.
References:
[1]: https://github.com/nvim-treesitter
[2]: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
telescope-project.nvim [1] by nvim-telescope [2] is a game-changer in its space. Excited to see how it evolves.
No description available.
References:
[1]: https://github.com/nvim-telescope/telescope-project.nvim
[2]: https://github.com/nvim-telescope
I came across lspsaga.nvim [1] from nvimdev [2], and it’s packed with great features and ideas.
improve neovim lsp experience
References:
[1]: https://github.com/nvimdev/lspsaga.nvim
[2]: https://github.com/nvimdev
rmagatti [1] has done a fantastic job with auto-session [2]. Highly recommend taking a look.
A small automated session manager for Neovim
References:
[1]: https://github.com/rmagatti
[2]: https://github.com/rmagatti/auto-session
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 # [1]
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 # [2]
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.
tail -n 1 info.log | clip.exe
pipe streams of text into clip.exe
make it a bit more natural # [3]
I recently made mine feel a bit more natural by aliasing it to clip.
alias clip=clip.exe
pop this in your ~/.bashrc or ~/.zshrc
yanking to windows clipboard from vim # [4]
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 ...
I’m impressed by onebuddy [1] from Th3Whit3Wolf [2].
Light and dark atom one theme
References:
[1]: https://github.com/Th3Whit3Wolf/onebuddy
[2]: https://github.com/Th3Whit3Wolf
I’m impressed by awesome-streamerrc [1] from awesome-streamers [2].
Dotfiles for various streamers on Twitch.
References:
[1]: https://github.com/awesome-streamers/awesome-streamerrc
[2]: https://github.com/awesome-streamers
If you’re into interesting projects, don’t miss out on telescope-fzf-native.nvim [1], created by nvim-telescope [2].
FZF sorter for telescope written in c
References:
[1]: https://github.com/nvim-telescope/telescope-fzf-native.nvim
[2]: https://github.com/nvim-telescope