Log inSign up
Log inSign up
Christopher Orr 🦋
3,394 posts
Christopher Orr 🦋 profile banner
@orrc

Christopher Orr 🦋

@orrc
Some Scottish guy. Knows a bunch of stuff about computers. Sometimes applies this knowledge at @Stripe. Award-winning baker of shortbread. 🥉
Berlin, Germany
bsky.app/profile/orr.dev
Joined July 2007
439 Following
407 Followers
RepliesRepliesRepostsRepostsMediaMedia

Log in or sign up for X

See what’s happening and join the conversation

Continue with phone
or
Log in with username or email
Terms·Privacy·Cookies·Accessibility·US TIDA·Ads Info·© 2026 X Corp.
  • @orrc
    Christopher Orr 🦋
    @orrc
    Jun 17, 2025
    Finally! 🥳
    @irvinebroque
    Brendan Irvine-Broque
    Cloudflare
    @irvinebroque
    Jun 17, 2025
    You can now grant people on your Cloudflare account *read-only* access to the Workers Platform. Enables a common pattern: 👀 Grant read-only access to every engineer 🔒 Only allow changes via pull requests. Give your CI system an access token with admin (deploy & edit)
  • @orrc
    Christopher Orr 🦋
    @orrc
    Feb 19, 2025
    Thanks to the person at @webflow who added the trigger type and collection ID in all the new v2 CMS webhook payloads! 🥳 Zero thanks to the person at @webflow who omitted the collection ID when retrieving a CMS collection item, meaning I can't re-use the data model… 😩
    Screenshot from https://developers.webflow.com/v2.0.0/data/reference/webhooks/events/collection-item-created — the webhook JSON payload says that an item with given "id" and "collectionId" was "created". Useful!
    Screenshot from https://developers.webflow.com/v2.0.0/data/reference/cms/collection-items/staged-items/get-item — the JSON response is near-identical to the webhook payload, but only includes the "id". Sad!
    Screenshot of my Kotlin JSON deserialisation interface, which I use to deserialise webhook payloads into concrete data class instances.

But this relies on `collectionId` being defined…
```
@Serializable
// Use the Webflow collection ID on each item to automatically deserialise to a subclass
@JsonClassDiscriminator("collectionId")
sealed interface WebflowCmsItem {
  val id: String
  val collectionId: String
  val fieldData: WebflowCmsItemData
}
```
    1
  • @orrc
    Christopher Orr 🦋
    @orrc
    Dec 18, 2024
    I think @DuckDB 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)
  • @orrc
    Christopher Orr 🦋
    @orrc
    Dec 5, 2024
    I just ran into this non-intuitive case with @Kotlin 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/#eyJ2ZXJzaW9uI…
    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) }
}
```
  • @orrc
    Christopher Orr 🦋
    @orrc
    Nov 11, 2024
    Good news: you can now read your colleagues' messages with the gravitas they deserve! The @SlackHQ desktop client has added support for Comic Sans…
    A screenshot of Slack, with all text in Comic Sans