Skip to content

Instantly share code, notes, and snippets.

View sirhcsenots's full-sized avatar

cc sirhcsenots

View GitHub Profile
@jiaaro
jiaaro / _INSTRUCTIONS.md
Last active January 22, 2024 17:47
Using Swift libraries in Python

Using Swift libraries in Python

So... this is obviously totally, 100%, like for. real. not. supported. by. Apple. …yet?

But still... I thought it was pretty badass. And, seeing how there's already a Swift buildpack for Heroku you could move some slow code into Swift can call it as a library function. But, you know, not in production or anything. That would be silly, right?

Now, having said that, the actual Python/Swift interop may have bugs. I'll leave that as an exercise to the reader.

How to get Python code calling Swift functions:

@cben
cben / CF-CNAME-flattened-TTL.md
Created September 10, 2015 20:46
The problem with CloudFlare's DNS "CNAME flattening" TTL

[attaching this to a CloudFlare survey why I left them (for DNSimple)]

I was a free user using CloudFlare only for DNS, chiefly because it can simulate CNAME at an apex domain. The apex domains mathdown.net,mathdown.com point to mathdown-cben.rhcloud.com. Cloudflare "CNAME-flattening" nicely returns an A record; unfortunately it's served with a huge TTL of 7 days(!), which causes a long outage when the underlying IP changes.

I asked support how I can lower the TTL (BTW it's great that you provide free support at all) and was told [https://support.cloudflare.com/hc/en-us/requests/522551, emphasis mine]:

This is based on the TTL of your authoritative provider for mathdown-cben.rhcloud.com: