-
For the past few weeks, we have woken to see rabbits in the garden. Sometimes a solitary one, sometimes a pair and, once, three happily munching on the lawn. Given C’s familiarity with Peter Rabbit, we’ll lift him to the window and watch as he whispers “babu”.
-
I upgraded my standing desk from two piles of books about magic tricks and movie tie-ins to a mechanical standing desk converter.
-
I occasionally contribute Homebrew Casks and have been adding
livecheck
stanzas. This allows you to see when there are newer versions of formulae and casks upstream, e.g.$ brew livecheck --installed --newer-only
-
Thom told me about Nicola Lamb’s recipe development and kitchen journal, Kitchen Projects. I haven’t yet attempted any recipes but top of my list are XXL Cheese Scones and Pasteis de Nata.
-
When importing database dumps into a local server for development, I typically run something like the following where
agiantdumpfile.sql
might be hundreds of megabytes in size:$ mysql -u root -p somedatabase < agiantdumpfile.sql
All too often, I accidentally get the file redirection the wrong way around, e.g.
$ mysql -u root -p somedatabase > agiantdumpfile.sql
Which instantly obliterates
agiantdumpfile.sql
, replacing it with an empty file.I discovered zsh’s
noclobber
option which prevents this from happening:$ setopt noclobber $ echo 'foo' > bar $ echo 'baz' > bar zsh: file exists: bar
There’s a great discussion on the Unix & Linux Stack Exchange about why
noclobber
isn’t the default setting. -
I had to fix a client’s website that didn’t respect Chrome’s font size setting. While the Zoom function worked, increasing or decreasing the default font size did nothing to the text across the site.
Looking in the CSS, I discovered over 100
font-size
s set in absolute pixels, overriding the browser settings.To fix this without changing the appearance of the site for users who haven’t adjusted their settings, I converted all font sizes to be relative to the common browser default of
16px
by first setting the base font size as a percentage:html { font-size: 68.75%; /* 11/16 = 0.6875 */ }
I then expressed all other font sizes in
rem
s relative to that base11px
:p { /* font-size: 14px; */ font-size: 1.27rem; /* 14/11 = 1.272727273 */ } h1 { /* font-size: 20px; */ font-size: 1.82rem; /* 20/11 = 1.818181818 */ }
-
I’ve also been working on a static site generated by Gatsby and ran into strange jumbled up components (such as you might expect when you don’t set an appropriate
key
) when using client-side functionality with React.Josh Comeau sums up the issue and a workaround perfectly when it comes to hydrating server-side React.
-
I thoroughly enjoyed Teddy Katz’ “Bypassing GitHub’s OAuth flow” and “Stealing arbitrary GitHub Actions secrets” as an insight into how serious security flaws are discovered via seemingly innocuous bugs.
Thankfully, Brakeman checks for “HTTP Verb Confusion”.
-
Listening to Adam Buxton interview fellow UEA alumnus Kazuo Ishiguro, discussing science fiction, AI and the selfishness of apology was utterly fascinating.
-
My sister just handed me a single AirPod and said “I just found this in the washing machine.”
Weeknotes 73
By Paul Mucur,
on