Usable multi-selects in Rails forms

12 Sep 2022

Look. I use Rails for side projects because I’m lazy. But not so lazy that I’m willing to put up with really really bad multi-selects.

This is a quick and not very dirty way to get clean and largely seamless multi-selects for Rails forms that still send data over REST, without changing the way anything works. It uses React, Stimulus, and Rails ActionController.

» Read post

Chipotle chili

04 Dec 2021

This is a warm, often spicy, chili recipe. Black beans only. Smoky chipotle chilis and toasted cumin. Poblano peppers.

» Read post

Sane Ubuntu UI scaling part 2

04 Dec 2019

Recently I posted about getting fractional scale factors for GNOME 3 on Ubuntu. I’ve since abandoned GNOME in favor of Mate because GNOME was crashing on me on a default install, and could be quite slow at times when loading large resources. Mate has neither of these problems, and as an added bonus, scales in a reasonable way out of the box.

» Read post

Getting sane UI scale factors in GNOME 3

28 Nov 2019

I’m going to go out there and say it, I really like GNOME. I know that a lot of people don’t. Whatever. I’m usually on hardware fast enough that it can handle this beast of a DE. But, having just installed it on a ThinkPad X1 Carbon with a nice WQHD display, I was a little irritated that the only 2 display scale factors were 100% and 200%. Which is to say, “too tiny for most people without a microscope”, or “dangit now I can only see like 5 characters on the screen”. Basically, I needed 150% scale factor. This is how to get it.

» Read post

Resizing Encrypted Linux volumes on LVM

21 Nov 2019

Recently I set up a fully encrypted Linux install alongside Windows using LVM to encrypt the / and /home partitions, as well as swap. This all went fine and dandy until I realized I had been a little greedy and given root nowhere near enough space (I was trying to horde it all for the /home volume). So, I had to figure out how to shift that space around. This, for my own memory, is how:

» Read post

Installing Linux with full partition encryption

13 Nov 2019

So, this is going to be one of any number of posts out on the web about setting up a dev environment on Linux, but it’ll be good for me as reference in the future. This is going to cover setting up Ubuntu 19.10 on a ThinkPad X1C (7g), dual-boot with Windows 10, with both OSes fully encrypted at the partition level (full-disk encryption is technically impossible since we’re splitting the disk for Windows and Linux).

» Read post

Mocking the browser window object in Jest

25 Oct 2019

In the application I work on most of the time, we pass a lot of data from Rails to the React frontend by writing constants to the window object in the browser. Testing this can be a bit of a pain though.

» Read post

Filesystem case-sensitivity and git

20 Oct 2019

I’m in the process of moving from OS X to Ubuntu (via WSL2) for all of my development work, and ran into an odd behavior with a zsh function I use all the time to diff my current work against the master branch, that it turns out, is caused by the case-sensitivity of the Linux filesystem (unless I’ve misunderstood things).

» Read post

Better RSpec diffs with super_diff

18 Oct 2019

Every now and then I need to build up some complex hash/JSON data in Ruby to feed over to a JS frontend. I tend to work slowly and iteratively as I push the nesting deeper, which helps me find mistakes before it gets too complicated… but sometimes that doesn’t work.

» Read post

Copying to the Windows Clipboard from WSL

10 Oct 2019

The Windows Subsystem for Linux is great (so far). I like having a full Linux distro right here on a Windows machine. Pretty often though, I need to copy text from my shell into my clipboard (say, to add an SSH key to Github). It’s not immediately clear how you should do that from WSL.

» Read post