random musings from 改造

AWS and SMS


Code to get stuff done quickly using the AWS golang SDK is often surprisingly easy. For example, sending an SMS is as easy as the following…. package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/sns" ) func main() { sess := session.Must(session.NewSession()) svc := sns.New(sess) params := &sns.PublishInput{ Message: aws.String("Some Message Here"), PhoneNumber: aws.String("+44000000000"), } _, _ = svc.Publish(params) } …
Read more ⟶

Custom Freebsd Images (13.1) on Oracle Cloud ARM64


This is a rather terse guide to doing this. I’m assuming you already know what you’re doing with FreeBSD and are comfortable building your own systems from source. If not, go do that now and comeback here…. Download the diff from here. If that file is not found, it’s probably been updated. You can find the current version on this page. Apply the diff in /usr/src with git apply -p0 D34746.…
Read more ⟶

Cloudfront and index.html files


CloudFront is not a Web Server. It’s easy to think of Cloudfront as a web server - indeed once it’s set up it pretty much works as one, but behind the scenes it’s really just another interface to an S3 bucket, which itself you think looks like a filesystem, because it kinda pretends it is… The problem comes, after you’re used to hitting /some-location/ and the webserver automagically knows to server you index.…
Read more ⟶

Golang Highlighting


Playing with hugo. This should be some pretty formatted gocode …. package main import ( "crypto/rand" "log" "math/big" "net" "time" ) type foo struct { name string } func main() { var i int time.Sleep(5 * time.Millisecond) } …
Read more ⟶

Moving to AWS


Well, Moved actually… History. Many many years ago, kaizo.org was hosted the ony way you could host your own stuff, on physical hardware in a datacentre. Specifically, c0ke.kaizo.org was a physical Sun Microsystems SparcStation 10 which was hosted up at the excellent Legend Internet in Leeds. This was circa 2000 when all this was in place, and it served well until virtual machines bacame the next big thing. We retired c0ke because frankly, it was an absolute pain in the arse - if something when wrong it required a car journey from London or Oxford, all the way to leeds, to give it some love.…
Read more ⟶