November 18, 2024

Automatically start tmux in bash

I have become accustomed to having tmux running, which allows me to keep a single terminal open on my screen and create as many sub-terminals as I need in my work. However, I don’t want to have to remember to start tmux every time I start a terminal, and often I forget until the first time I try to split the pane or create a new tmux window. I also am in the habit of exiting shells manually (rather that close the whole terminal window), but if I start tmux manually, I have to exit both tmux and the shell itself, which gets tiresome. Read more

November 17, 2024

Easy WSL Upgrades

I’ve been using WSL to make developing on windows a bit more comfortable. One thing I’ve been trying to get a handle on is how to manage WSL major version upgrades. I’ve done it a different way each time I’ve needed a major upgrade, but I think I’m finally happy with the following, but it requires a bit of prep: Create a virtual disk drive, formatted to a linux compatible filesystem Attach the virtual drive to WSL on login Update /etc/fstab to mount the drive to home directory Use WSL like you normally would When it is time to make a major upgrade, delete the old VM, and install the new VM Update /etc/fstab of the new VM to mount the drive to home directory For small updates, using the distro’s package manager is fine, but this setup preserves the home directory, so it is safe to delete the VM without losing data. Read more

August 21, 2015

Go, Strings, and Character Encoding

I recently had a conversation with a friend about how UTF-8 and character encoding works in general, centered around why strings seem weird in Go if you’re used to how they’re handled in other languages. The way that Go handles strings is pretty cool: a string is slice of bytes. Period. End of story. It also just so happens that a Go program is defined as a sequence of UTF-8 characters (that’s all that is supported), so unless you insert raw bytes into them using escapes, a string literal is always UTF-8 in Go. Read more

August 19, 2015

Go Editor Setup

After a few nights reading the golang-book and hacking around with golang in general, I finally broke down and set up Vim to make it not feel like Unix circa 1970. I took a look at the IDE and text editor plugins list on the go github page and finally settled on a setup. Setup Vundle for managing vim plugins fatih/vim-go for code completion and syntax awareness fatih/molokai color scheme What I learned I’ve used vim for over a decade and know nothing about it Vundle’s required config breaks git if you are using the vi alias. Read more

November 15, 2014

Go CD with github via ssh

Trying to use a git@ url to pull from using the Go continous delivery agent? I found http://support.thoughtworks.com/entries/21593593-Issues-with-Go-and-Github-SSH-Keys-?flash_digest=53af7e8bf011eda1e9112350616a350880049a70 on the thoughtworks go support forum. Dave Green correctly said that all you had to do was: sudo su - go # do the following commands as the ‘go’ user ssh-keygen # don’t set a passsphrase on the key add the ~go/.ssh/id_rsa.pub contents to a new key on github git clone # this adds the github ssh server to known_hosts The last step was what was tripping me up; the test clone adds the host signature to the known_hosts file. Read more

© Brandon Atkinson 2024

Powered by Hugo & Kiss.