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.
All posts with the tag "linux"
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.
Setting up python with the native nvim>0.5 lsp was mr
https://github.com/neovim/nvim-lspconfig
lua << EOF require'lspconfig'.pyright.setup{} EOF
https://github.com/palantir/python-language-server/issues/190
...
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.
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.
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...
...
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.
...
https://www.hanselminutes.com/784/doing-open-source-with-brian-douglas
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 on Ubuntu.
...
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
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 inccomand
...
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 help, ?, 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.
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.
I installed with the reccomended snap for Ubuntu.
...
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.
Break scripts down into reusable components
...
Today I setup a new machine on Digital Ocean to use with TestProject.io, Here are my installation notes.
apt update && apt upgrade -y apt install zsh chsh zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" curl -fsSL https://starship.rs/install.sh | bash echo 'eval "$(starship init zsh)"' >> ~/.zshrc # python sudo apt update sudo apt install python3-pip -y echo 'alias python=python3' >> ~/.zshrc echo 'alias pip=pip3' >> ~/.zshrc # pipx apt install python3-venv pip install pipx pipx install black pipx install shell-functools pip install ipython # docker sudo apt update sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt...
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.
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.
Quick side note: your zsh config is controled by your ~/.zshrc file. This file can source other files, load plugins, or run literally anything.
...
Bash is super powerful.
Show Remaining Space on Drives
df -h
show largest files in current directory
...