Posts tagged: linux

All posts with the tag "linux"

133 posts latest post 2026-09-02
Publishing rhythm
Sep 2026 | 2 posts

tmux choose-tree

https://youtu.be/79Y-kqAiMpw Choose tree is a powerful tmux utility that provides a graphical interface to preview all sessions, windows, and panes, move between them kill them, move them and much more. The default keybinding my preferred keybinding to open sessions and windows collapsed and Zoomed in. From the man page. https://waylonwalker.com/tmux-nav-2021/ for more information on how I navigate tmux, check out this full post

tmux prefix

https://youtu.be/BMkpbfhbkKM The prefix key is an essential part of tmux, by default all of tmux’s key-bindings sit behind a prefix. This prefix is very similar to vim’s leader key. It is common for folks to change the default (control b) to or if they are a vim user something to match their vim leader key. A few of the essential default key-bindings. A more complete list of key-bindings can be found in this gist https://gist.github.com/mzmonsour/8791835. How I navigate tmux in 2021 for more information on how I navigate tmux, check out this full post

tmux splitting panes

https://youtu.be/kzgyiHap1nQ splitting panes is a core feature of tmux. It allows us to split the terminal vertically or horizontally into new panes. 🗒️ note that ‘#{pane_current_path}‘will keep the split in the same directory as it’s parent, without this it will default to your home directory. How I navigate tmux in 2021 for more information on how I navigate tmux, check out this full post

tmux last session

https://youtu.be/RB87EEnnMnU An ultimate productivity key-binding in tmux is one to switch to the last session. I use this to quickly get between sessions really quick. Often I am working and need to lookup a quick note, or copy something into my notes, then get back to where I was quickly. I think of this hub and spoke model, and use to quickly drive it. How I navigate tmux in 2021 for more information on how I navigate tmux, check out this full post

tmux floating popups

https://youtu.be/2ZqFDsJywt8 Tmux popups are actually floating windows that you can drag around the screen. They always open in the middle (by default) when you open them, no matter where you leave them. Here are a couple of keybindings I use to open up popup windows. How I navigate tmux in 2021 for more information on how I navigate tmux, check out this full post

tmux popups

https://youtu.be/2I8fB28zfB4 Tmux-popups are a great feature that is relatively new to tmux, many repos such as the standard ubuntu repos do not have it. Popups came in 3.2a, if your package manager does not have it, you can follow the tmux’s install instructions to build from source. How I navigate tmux in 2021 for more information on how I navigate tmux, check out this full post I use popups quite a bit in my workflow to ssh into another machine for a short period, or make a new project with a template.

Copy and Paste on Linux

These are the notes that I used as I set up my first ever ubuntu desktop. gnome-tweaks # nordix gtk theme # I ran this, but have no idea if it had any effect as the theme did not show up until I relogged. What I think actuagnome terminal showing scrollbar in tmuxlly worked was emoji support # One thing that I really missed quite early from windows was the emoji virtual keyboard. I like being able to quickly toss in those emoji that give just a bit of a visual cue 🔥, ⚠️,, 🎉, 🦄, 💜. installation # I found an application called emote. that seems to do everything I need it to in the snap store. Installation is a typicall snap install. default keybinding # The application came with a default keybinding, but I could never remember it. Windows keybinding # Old habits are hard to break, I opened up the gnome settings and set a hotkey to to run the command emote. How it works # Get that dock outta here # I tried to disable the dock and it didn’t immediately work for me, likely because I needed t…

How I configure git

Git can be a bit tricky to get configured correctly. I often stumble into config issues weeks after setting up a new machine that I did not even notice. These are my notes to remind me how I configure git. Identity # rebase # editor # default branch # push to current bransh wihtout setting upstream # Autostash #

python lsp setup

Setting up python with the native nvim>0.5 lsp was mr lsp-config # https://github.com/neovim/nvim-lspconfig pyls#190 # https://github.com/palantir/python-language-server/issues/190 mypy # Getting mypy working with lsp was tricky for me. I had some issues trying to run mypy in ci and pyright in my editor and I really wanted them to match.

How I navigate tmux in 2021

In 2021 I changed the way I navigate between tmux sessions big time. Now I can create, kill, switch with ease, and generally keep work separated into logical groups. Update # Since making this post, I have made ~20 other posts in short form that all have a YouTube video to go along with them you can find them all on my tmux-playlist. Chris Toomey’s Tmux Course # I took Chris’s tmux course in December 2020 and it was fantastic. Even as a seasoned tmux user, I learned quite a bit. Before the course, I was proficient in navigating within each of my tmux sessions but rarely started more than one session. A few months later, I have adopted a lot of what I learned from Chris and made it my own. I am now keeping projects to their own session and can move between them fluidly with just a few keystrokes. For high-traffic projects, I have them bound to a single keystroke for instant switching. This change has been a game-changer from the mess of windows I used to have and the nightmare it was to…

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…

📝 Docker Deep Dive - Notes

https://www.hanselminutes.com/784/doing-open-source-with-brian-douglas Play With Docker # A handy way to try weird things in docker is using play-with-docker. You get a four hour session for free, after four hours everything will be deleted, but you can start a new session. Installing Docker on Linux # Installing on Ubuntu. Running Docker commands without sudo # In order to run docker commands without using sudo you need to add docker to your group. Architecture and Theory # Container - Isolated area of an OS with resource usage limits applied. Namespaces and Control Groups are hard, which is why containers were unusable by mortals before docker. Namespaces # Isolation Each container looks and feels like a regular OS. It has its own eth0, users, kernel. These are completely isolated from every other container running on the system. Namespaces are analogous to what Hypervisors do on hardware. Process ID (pid) Network (net) Filesystem/mount (mnt) Inter-proc comms (ipc) UTS (uts) User (us…
Live Substitution In Neovim

Live Substitution In Neovim

Replacing text in vim can be quite frustrating especially since it doesn’t have live feedback to what is changing. Today I was watching Josh Branchaud’s Vim-Unalphabet series on Youtuve and realized that his vim was doing this and I had to have it. https://twitter.com/_WaylonWalker/status/1346081617199198210 How to do it # I had to do a bit of searching and found a great post from vimcasts that shows exactly how to get the live search and replace highlighting using:h inccommand # Add this to your config # I believe that this is a neovim only feature, add it into your file. You can see it in my dotfiles as well. See it in Action # example live substitution The Video that inspired this # Check out Josh Branchaud’s great series on the Vim-Unalphabet. https://www.youtube.com/watch?v=5jMiYtXz2QA

Newsboat

Web browsers are a black hole of productivity. I try to use them as little as possible when it is time to focus. I try to use,, or with ipython, or –help at the command line as much as possible. What about that time I am trying to see what my online friends are posting on their sites? I used to used google reader quite heavily before that was taken down. Newsboat # I am going to give a terminal rss reader a try for a bit and see how that goes for me. I have really struggled to get into an rss reader since google reader died. installation # I installed with the reccomended snap for Ubuntu. Adding feeds # super simple Running help for newsboat directed me towards their config files at the bottom. I just need to edit its urls file. The Urls file is just a list of urls to rss feeds. Adding mine in allowed me to see all of my posts. Config # I took most of my config from a blog post that I found by Evan Travers. It set some sane defaults to the reading width and vim keys. GUI Browser # No m…

Creating Reusable Bash Scripts

Bash is a language that is quite useful for automation no matter what language you write in. Bash can do so many powerful system-level tasks. Even if you are on windows these days you are likely to come across bash inside a cloud VM, Continuous Integration, or even inside of docker. I have three techniques that help me write more composable bash scripts. functions Arguments positional arguments All Arguments Error Handling main script Functions # Break scripts down into reusable components Functions in bash are quite simple. They are something that I wish I would have started using long ago. They make your code much more reusable. I often use them in my aliases as well since they can simplify the process and allow more flexibility. syntax Source the file to load the function and run it from the terminal. run it outputs Arguments # Make functions a little more flexible Arguments and options are quite a bit more complex in bash. For now, we will focus on the basics which are not all that…

Out of Space

This morning I logged into my machine and was nearly out of space 64GB miniconda3! 5GB conda cache 4GM pip cache 34GB docker Find it # These are the commands that I often use to reclaim space. Its so easy to fill up small vm’s in the cloud, or in my case today let your dev machine go way too long without a good cleanup. Show Remaining Space on Drives # This shows us where to start and gives a baseline of how much space we have reclaimed. show largest files in current directory # Next keep drilling into directories that are big and running this command to see whats big inside of it. When you find somethign that you are willing to part with it and check to see if you have enough reclaimed yet. Honestly I rarely bother unless the directory is in the GB’s of space. A super simple filter for that is to just grep for G. conda # How Many? # As a first baseline lets see how many enviroments we are starting with. I started with 71. Yeah I have had this machine for 2 years, and dont regularly re…
2 min read

Supercharge Zsh Startup

I have been using oh-my-zsh successfully for about 2 years now. But lately my startup time has been really bothersome. It has grown to the point where it was taking about 5.5s to startup a shell! This is ok if I am going to spend some time in here for awhile and do some work that benefits from all of the autocompletions, plugins, and shortcuts that oh-my-zsh brings. But to only jump in to run a handful of commands is infuriating. 📑 My Setup # I believe the real issue is io speed on wsl. I have some remote servers with similar configs that are 10x faster or more, loading in 100s of milliseconds rather than seconds. Sourcing all of the individual plugin files are just too much for it. 💨 How Fast can it be # Quick side note: your zsh config is controled by your ~/.zshrc file. This file can source other files, load plugins, or run literally anything. Time the initial time Move your ~/.zshrc config file. Time the fastest startup possible with nothing in your ~/.zshrc config file. Move your…

📝 Bash Notes

Bash is super powerful. File System Full # Show Remaining Space on Drives show largest files in current directory Move files then symlink them Fuzzy One Liners # edit in vim cat a file bash execute git add git reset Kill a process Finding things # Files # fd-find is amazing for finding files, it even respects your file 😲. Install with. ++Vanilla Bonus Content # ** show matching text ** ++Vanilla Bonus ** show file names only ** ++Vanilla Bonus Recursively Replace text # ++Vanilla Bonus Extending or There are so many options inside of,, and that you could many an enormous amount of these if you really wanted to, but I like to keep it simple. These cover 90% of my usage. If I wanted to change something in the second half I would just paste in this command and edit it. More often though I want to limit the input, say only replace word1 to word2 inside of markdown files. Limited Scope ++Vanilla Bonus Large Refactor At The Command Line I use these replace commands heavily when doing large r…