Sign in

Gareth Adams

@gareth.fyi
43 followers 57 following 21 posts

gareth.fyi

PostsRepliesMedia
Gareth Adams @gareth.fyi · 28/07/2026
*change tack, by the way
101
Reposted by Gareth Adams
Thomas “Scary” Fuchs 🎃👻💀 @thomasfuchs.at · 01/06/2026
GitHub users rn
“It’s one banana” meme

It's one token, Michael
How much could it cost? $1,000?
024679
Gareth Adams @gareth.fyi · 13/01/2025
@kipheath.bsky.social Guess who has a printer and sticker sheets now
100
Gareth Adams @gareth.fyi · 27/12/2024
I hate when my phone has great signal but my apps aren't loading any data, and it's because my phone has decided to try connecting to a free WiFi network, so every request is silently getting redirected to the portal login screen in the background.
110
Gareth Adams @gareth.fyi · 23/12/2024
Oh no it isn't!
100
Gareth Adams @gareth.fyi · 04/12/2024
I'm catching up on this year's Advent of Code puzzles - this time around I remember that `ARGF` exists, which makes it much easier to write code that _receives_ the input rather than having to hardcode it. gareth.fyi/2024/12/04/a...
gareth.fyi
Advent of Code: Getting started
It’s time for Advent of Code again! I’m starting a couple of days late because my laptop got stolen, but the first few days should be easy enough to catch up on. My first solves are going to be in Rub...
000
Gareth Adams @gareth.fyi · 03/12/2024
Having my laptop stolen is really going to test how much of my stuff is really restorable. Do I need to remember how PGP keys work again?
010
Gareth Adams @gareth.fyi · 01/12/2024
I'm imagining this is an argument between two siblings
000
Gareth Adams @gareth.fyi · 27/11/2024
I mean, rubocop only took *8* years to get to v1.0.0 according to rubygems
100
Gareth Adams @gareth.fyi · 21/11/2024
Well you've linked to two places that are both embedding this year's AI commercial, yeah. It's very much not the same as the 1995 original, no, although it's clearly been trained on images from the various iterations
110
Gareth Adams @gareth.fyi · 19/11/2024
They at least will be able to supervise other people who are using AI tools 😉 But probably not much more than that
000
Gareth Adams @gareth.fyi · 19/11/2024
My firm belief is that Brits love *every* kind of weather, but only for 3 days. "Oh, a heatwave at last!" "Wow it's great to have good weather" "Ok I'm sick of being sweaty now" "Amazing! Snow day!" "Everywhere's so pretty outside" "Getting to the shops is kind of annoying"
040
Gareth Adams @gareth.fyi · 18/11/2024
I think that depends entirely on what kinds of things they expect to be supervising in the future
100
Gareth Adams @gareth.fyi · 17/11/2024
Just found an unprecedented FIVE Bertie Bassetts in a single pack of Liquorice Allsorts. (I feel like this is the kind of energy I should be aiming for at this stage of Bluesky)
020
Gareth Adams @gareth.fyi · 15/11/2024
I forgot to mention earlier that Javascript's CSSOM library (in browsers by default) has a CSS.escape method which deals with this: > CSS.escape('123') // => "\31 23" But actually trying to use this in practice makes your Javascript feel as clunky as your CSS is.
050
Reposted by Gareth Adams
Cristian Díaz @itscrisdiaz.com · 15/11/2024
Or you can use the attribute selector [id="123"] { color: red; }
031
Gareth Adams @gareth.fyi · 15/11/2024
You might get tripped up by this if you use unprefixed UUIDs as HTML IDs for example, and then target them with Javascript. The easiest solution is definitely "don't". Or use `getElementById` which works. But the fact that this escaping syntax exists and looks like this is *eye-opening*.
120
Gareth Adams @gareth.fyi · 15/11/2024
That's right, if you want to target id="123" in CSS (or in Javascript's querySelector) you end up with this ABOMINATION(!) At that point, if you need this (because you're generating IDs) you should just add a prefix <div id="123">Hello, world!</div> <style> #\31 23 { color: green } </style>
4111
Gareth Adams @gareth.fyi · 15/11/2024
This is because CSS thinks you're escaping the codepoint 3123 here ("ㄣ"). Instead, you have to either a) pad the Unicode codepoint to 6 hexadecimal characters, or b) add a space after the escape sequence to finish the escape: #\00003123 { color: green } /* YES */ #\31 23 { color: green } /* YES */
160
Gareth Adams @gareth.fyi · 15/11/2024
The Unicode codepoints for the digit characters run from 0x30 to 0x39, which means the escape sequence for a leading `1` is `\31`. But if you try escaping this way, you'll find you still aren't all of the way there yet. #\3123 { color: red } /* No */
120
Gareth Adams @gareth.fyi · 15/11/2024
CSS has a single method of escaping characters for identifiers, and it's not one of the common ones: you can replace a character with a \ followed by the unicode codepoint for that character in hexadecimal. #\123 { color: red } /* No */ #"123" { color: red } /* No */
130
Gareth Adams @gareth.fyi · 15/11/2024
Fun learning about CSS today. Since HTML5, element IDs can start with numbers. But in the CSS selectors spec, and therefore in `document.querySelector`, identifiers *can't*. So how do you target an element with a numeric ID? <div id="123">Hello</div> #123 { color: red } /* No */
3484
Gareth Adams @gareth.fyi · 14/11/2024
Want any Twitch-related sanity checks beforehand?
100