Posts by Christopher Orr 🏴
youtu.be/Z75tKczbRW4
29 years ago today, Jamiroquai released the music video for 'Virtual Insanity'
Hi Internet! I'm Drew and THIS IS MY FACE.
If this GIF has ever brought you joy in the past, I humbly ask you to consider making a donation to the National MS Society. It would mean a lot to me and to those I know affected by the disease!
Donate at blinkingguy.com
The juxtaposition of architectural styles in Dublin is quite something.
A poster near a bathroom at BER airport, with a ridiculously dense QR code. It encodes an email with a long body, in both German and English, requesting that this particular bathroom be cleaned.
This one from Berlin airport is my favourite… and it doesn't even point to a web URL!
The best HTTP client just got better 👌
A screenshot of Google's AI Overview answer to the question "is haggis an animal". It says "Yes, the haggis is a small, furry mammal native to Scotland" and goes on to give the typical "asymmetrical legs" details.
The Scottish have won the AI Wars.
Thanks for the reply. Looks like the opening `{` was missed from the Customer.io unsubscribe link. No need to remove me manually, thanks.
Screenshot of PostHog email with just an image and "1-click unsubscribe" link which was broken. I then replied to their "hey@posthog.com" email address, only to get an auto-reply saying that they don't monitor this address… 👌
Oops. Another case of good intention, bad execution from @posthog.com… 🙁
@1030.bsky.social
Our "Urine-free kettle guarantee" sign has people asking a lot of questions already answered by the sign.
Just found an excellent tmux tip to easily change window order:
```
bind-key -n C-S-Left swap-window -t -1\; select-window -t -1
bind-key -n C-S-Right swap-window -t +1\; select-window -t +1
```
superuser.com/a/552493/22805
"Half the world is telling me to use coroutines because a thread per request is too heavy, the other half a lambda because a computer per request isn't"
— Duncan McGregor
(Source: github.com/jOOQ/jOOQ/is...)
Kotlin diff showing `val ignoreInvalidId: Boolean = true` being replaced with `val ignoreInvalidId: String = "true"`. Plus a comment: "The documentation says it should be a boolean, but in reality the API only accepts a string… https://amplitude.com/docs/apis/analytics/user-privacy#json-body-parameter"
Meanwhile, here's the diff-of-the-day for our Amplitude integration…
Screenshot of a cURL request to the "Delete persons" API, using the string `id` previously retrieved. It returns HTTP 202.
Anyway… the good news is that we can ignore the docs: the deletion API *does* in fact accept this newly acquired definitely-not-an-integer `id`.
Of course, it returns HTTP 202 rather than the documented HTTP 204 — but it works! 👍
At this point, I'm taking the docs with some big grains of salt.
The deletion API should return HTTP 204 with no response body. So why can I pass a `format` parameter to choose between JSON or CSV? 🤔
(requesting a CSV response will earn you an HTTP 500)
posthog.com/docs/api/per...
Screenshot from the "List all persons" API response documentation. This includes an integer `id`, a string `uuid`, and an "array" of `distinct_ids`.
Screenshot of a cURL request to the "List all persons" API, piping the results to `jq` to grab the one (and only) profile from the response. The response contains identical `id` and `uuid` string values — both are a UUID that differs from the `distinct_id`.
Supposedly I can only look up a single user if I know their integer `id` value. But it's possible to search by `distinct_id`, which will return the number I need! 🥳
However, the response has the `uuid` string that the docs mention (but don't explain), along with the EXACT SAME VALUE as the `id`… 😵💫
Screenshot from the documentation, saying that a `distinct_id` cannot be used again after deletion.
Screenshot from the linked API docs, saying that the deletion API requires an `id`: "A unique integer value identifying this person".
I'm implementing account deletion.
Deleting a PostHog profile means you can't later use the same `distinct_id`. Sounds great — we assign our users a UUID and use that when sending data to PostHog.
So then what's this mysterious integer `id` that the deletion API needs?
posthog.com/docs/api/per...
Screenshot from the linked PostHog docs, saying that you need to create a "personal API key".
It's been a non-zero WTF-per-minute count with the @posthog.com API today…
Firstly: the API requires a key that's tied to my account, rather than the PostHog organisation. Will the API key break when I leave the company soon? Maybe!
posthog.com/docs/api#pri...
Oh interesting.. no more info about `previous_attributes` in events 🤔 Plus no more `expand` for API requests!
I think @duckdb.org is starting to rival `jq` as my handiest command-line utility…
cat payments.jsonld | duckdb -c "copy (from read_json('/dev/stdin')) to '/dev/stdout' (format csv)"
(in fact, I should maybe just make this a shell alias)
Screenshot of Kotlin code: ``` import kotlinx.serialization.Serializable import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json @Serializable data class Person( val name: String, // Not serialised by default, unless `false`! val isCool: Boolean = true, ) fun main() { // Prints { "name": "You" } Json .encodeToString(Person("You")) .also { println(it) } // Prints { "name": "You", "isCool": true } Json { encodeDefaults = true } .encodeToString(Person("You")) .also { println(it) } } ```
I just ran into this non-intuitive case with @kotlinlang.org JSON serialisation…
A `data class` field with default property value won't appear in the JSON output — even if you explicitly provide it in your constructor call! 🤔
You need `encodeDefaults = true`: play.kotlinlang.org#eyJ2ZXJzaW9u...
A screenshot of Slack, with all text in Comic Sans.
Good news: you can now read your colleagues' messages with the gravitas they deserve!
The Slack desktop client has added support for Comic Sans…
GIF from the Refined GitHub docs showing a PR list before and after the "dim bots" feature is enabled.
The excellent Refined GitHub browser extension will at least minimise and dim such PRs by default:
github.com/refined-gith...