Published

Current listening: “The Best of the Alessi Brothers”

Currently listening to The Best Of The Alessi Brothers (1998). Had no idea about them, came across them via two cool cats on Twitter.

These vibes are the perfect thing right now. Also, will be taking photos of the Alessi Bros to the hairdresser when that’s an option again.

Apple Music | Spotify

The album’s not on Bandcamp, but “Seabird” is included in Late Night Tales: Metronomy.

Published

Use a VPN when you search for recipes

Highly recommend using a VPN when searching for recipes online. When I set the server to an appropriate country for what I’m looking for, I almost always get way better results. And even when the results aren’t objectively better, they usually widen my idea of what any one particular dish can or should be.

Of course I usually search in English. For better results, search for the dish by the name it’s actually called using the correct characters, not the English name or anglicized spelling. That was the only way to find a decent dökkt rúgbrauð recipe.

If you don’t have a VPN, you can try changing your search region. See Duck Duck Go’s instructions or Google’s instructions.

Published

Fix for overflow at top / bottom of screen when using CSS Scroll Snap

I’m currently working on a site that uses CSS Scroll Snap to frame some of the content nicely as you scroll through. In Chrome though, I was getting weird overflow issues at the top and bottom of the screen. If I scrolled to the bottom and then kept attempting to scroll down, it would gradually add more and more length to the page. Same with scrolling back up.

Adding overscroll-behavior-y: none; to the body element sorted it out. Read more about overscroll-behavior on MDN.

I originally tried to add this property to the html element since that’s the element with scroll-snap-type: y mandatory;. This didn’t work though, it seems that overscroll-behavior has to be on body.

Published

Disabling “save to Pinterest”

Just had a collaborator ask if we could disable the “save to Pinterest” button even if a visitor has a Pinterest addon / extension in their browser. My immediate reaction was “Maybe? I’d think not but will see!”

Turns out something like this should be possible. Pinterest supports disabling saves from a site, see their documentation. You can either enable it site-wide or per image.

I’m surprised but really happy to see that they offer this, hope that they continue to do so.

Published

Single `mv` command to change all filenames in directory to lower case and replace spaces

This is the mv command I use to change all of the filenames in my current directory from mixed case to lowercase and replace spaces with underscores.

for file in *; do mv "$file" `echo $file | tr ' ' '_' | tr '[:upper:]' '[:lower:]'`  ; done

The ; semicolons indicate the end of each line of this command. To break it down:

  1. for file in * loops over all the files in the directory. You could change the * wildcard to something like *.jpg if you wanted to only target JPG files.
  2. do mv "$file" instructs the system to move each file in the loop to the location that immediately follows.
  3. `echo $file | tr ' ' '_' | tr '[:upper:]' '[:lower:]'` is the location we’re moving the file to. We use the tr “translate” command to replace spaces with underscores, and then again (separated by the | pipe character) to replace uppercase letters with lowercase letters. Then we echo that translated filename.
  4. done lets the system know that the loop is done.

I use this occasionally to prep files for use on the web when working on a static site, one that isn’t hooked it up to a CMS.

Published

What it was like being a poll worker

Circular enamel pin for the November 3, 2020 General Election in San Francisco

Being a poll worker was great. I think a lot of that had to do with the people I was working with all day (very nice), the precinct I was in (comfortable), and how busy it was (super quiet). It was a good way to be introduced to it, all in all. And I got a shiny new pin. 🙂

We really didn’t have that many people come in to vote, likely due to the big push for Vote By Mail. The vast majority of people were coming by to drop off their ballot. The longest the line ever got was about 5 people deep in the morning, then by about 11am or so there was almost no line at all. It was pretty chilly, unusually windy out and we had to have the windows and doors open all day for ventilation, but that wasn’t too bad.

There were only two frustrating points.

Read more

Published

Current listening: “My Finest Work Yet” by Andrew Bird

Currently listening to My Finest Work Yet (2019) by Andrew Bird. “Bloodless” is particularly on the nose.

Well, the best lack all conviction
And the worst keep sharpening their claws
They’re peddling in their dark fictions
While what’s left of us
Well, we just hem and we haw

And it’s so damn slinky, catchy.

LP from Loma Vista Records | Apple Music | Spotify