On this day: 29 November

2025 · 1 year ago

Listened to Ennio Morricone

3 listens · 2m ·

Tracklist
  1. Escape on a Horse - Fuga a Cavallo · Ennio Morricone
  2. Escape on a Horse - Fuga a Cavallo · Ennio Morricone
  3. Escape on a Horse - Fuga a Cavallo · Ennio Morricone

2024 · 2 years ago

Earned 4 trophies in Horizon Zero Dawn™ Remastered

4 bronze ·

Trophies
  • Tore off 10 components
  • Defeated the Sawtooth
  • First Modification
  • Stealth killed 10 machines

Listened to Exciter by Judas Priest

Listened to Judas Priest

2 listens · 6m ·

Tracklist
  1. White Heat, Red Hot · Judas Priest
  2. Better by You, Better Than Me · Judas Priest

Listened to 14 tracks

Judas Priest, Radiohead, Eminem and 11 more · 54m ·

Tracklist
  1. Better by You, Better Than Me · Judas Priest
  2. Man of War · Radiohead
  3. Houdini · Eminem
  4. T.R.I.C. · Otep
  5. Somebody's Watching Me · Rockwell
  6. The Pot · Tool
  7. Big in Japan · Ultramixx
  8. Liberate · Slipknot
  9. I GOT THAT · P.O.D.
  10. Solitaire Unraveling · Mushroomhead
  11. I'm Ill · Joyner Lucas
  12. Blackheart · Motörhead
  13. Need to Feel · Soil
  14. Kickapoo · Tenacious D

I’m working on a WordPress plugin to import scrobbles from Last fm and display on your website.

It’ll work like the traktivity plugin that imports and displays trakt watches for TV shows and films.

It’s an itch I want to scratch but hopefully could be helpful to others out there.

Listened to Serious Privacy

2 listens · 26m ·

Tracklist
  1. A Great Week in Privacy · Serious Privacy
  2. Brussels State of Mind · Serious Privacy

2023 · 3 years ago

Getting started with Terraform

In this guide I’ll show you a way to get started with Terraform — specifically with Digital Ocean.

Terraform is a program that can be used to build your cloud-based infrastructure based off of configuration files that you write. It’s a part of what is referred to as “Infrastructure as code (Iac)”.

Instead of going into various cloud provider UI dashboards and clicking around to build your resources, Terraform can do all that provisioning for you. It uses the cloud provider APIs behind the scenes — you just write exactly the infrastructure that you want to end up with at the end.

In this guide, we will provision a simple Digital Ocean Server (a Droplet in Digital Ocean parlance) using Terraform from our local terminal.

If you don’t yet have a Digital Ocean account, feel free to use my referral link to set one up. With that link you’ll get $200 in credit to use over 60 days.

Setting up Terraform in 4 steps

1 :: Install terraform

Terraform is available to install from pretty much all package repositories out there.

Installing it should be as simple as running a one-line command in your terminal.

2 :: Configure any required cloud provider API tokens

In order to let the Terraform program make changes to your cloud provider account, you will need to set up API tokens and tell Terraform where to find them.

In this post I’ll only be setting up a single one for Digital Ocean.

3 :: Write your main.tf configuration file

A single main.tf file will be enough to get you something working.

Add all of your needed resources / infrastructure in it.

4 :: Run the apply command

By running the terraform apply command against your main.tf file, you can turn your empty cloud infrastructure into a working setup.

Step 1 :: Install Terraform

Terraform’s documentation details the numerous ways of getting it installed across operating systems.

I use Arch Linux and so install it like so:

Bash

sudo pacman -Sy terraform

You can check it is installed and discoverable on your system by checking the version you have installed:

Bash

terraform -v

# My Output
Terraform v1.6.4
on linux_amd64

Now create an empty directory, which will be your “terraform project”. It doesn’t matter what you call the folder.

Then inside that file create a file called main.tf. We’ll come back to this file a little later.

Step 2 :: Configure any required cloud provider API tokens

Head to your Digital Ocean API Tokens dashboard and click “Generate New Token”. Give it a name, choose an expiry and make sure you click the “write” permission option. Click “generate token”.

There are a number of ways we can tell Terraform what our Digital Ocean API Token is:

  • Obviously we could hard code it for the purposes of just getting it running while learning, though I wouldn’t recommend this approach even in testing.
  • Another is to use Terraform-specific environment variables set on your system. This has been my approach in the past. However, I came to realize how unsafe this was as every program you install has the potential to read from your environment variable.
  • A third way is to pass it as a parameter when calling the apply command.

I will be opting for that third option, but I don’t want to have that token saved in my history or have to pass it in everytime I want to run a Terraform command.

So my solution is to write a small wrapper bash script that will read the contents of a file in my home directory (with my token in) and pass it as an argument to the Terraform apply command.

Creating a wrapper bash script to safely pass secret token to command

Create a file in your home directory called “terraform-test”. You can call it anything, just remember to reference it correctly when using it later in the guide.

Inside that file, paste only the API token that you got from your Digital Ocean API dashboard. Then save the file and close it.

Open a new file in the root of your Terraform project and add the following contents:

Bash

#!/usr/bin/bash

terraform "$@" -var "do_token=$(cat ~/terraform-test)"

Save that file as “myterraformwrapper”. (You can call it whatever you want, I use “myterraformwrapper” as an example).

Also make sure to give it executable permissions by running the following command against it:

Bash

chmod o+x myterraformwrapper

The myterraformwrapper script does the following:

  1. Calls the terraform command.
  2. Any arguments you pass to myterraformwrapper get put in the place of "$@"
  3. Appends on to the command, the -var flag and sets the do_token parameter to the contents of the terraform-test file you created previously.

This means:

Bash

./myterraformwrapper apply

… behind the scenes, becomes…

Bash

terraform apply -var "do_token=CONTENTS_OF_YOUR_DO_TOKEN"

This means that you are not having to keep passing your Digital Ocean token in for every command, and you wont end up accidentally leaking the token inside your shell’s env variables.

We will use that file later in this guide.

Step 3 :: Write your main.tf configuration file

For this example, everything will be kept in a single file called main.tf. When you start working on bigger infrastructure plans, there is nothing stopping you from splitting out your configuration into multiple, single-purpose files.

YAML

terraform {
    required_providers {
        digitalocean = {
            source = "digitalocean/digitalocean"
            version = "~> 2.0"
        }
    }
}

variable "do_token" {}

provider "digitalocean" {
  token = var.do_token
}

resource "digitalocean_droplet" "droplet" {
  image    = "ubuntu-22-04-x64"
  name     = "terraform-test"
  region   = "lon1"
  size     = "s-1vcpu-1gb"
}

terraform block

At the top of the file is the terraform block. This sets up the various providers that we want to work with for building out our infrastructure. In this example we only need the digital ocean one.

variable declarations

Variable declarations can be used to keep sensitive information out of out configuration — and thus source control later, as well as making our configuration more reusable.

Each of the variables that our configuration needs to run must be defined as a variable like above. You can define variables in a few different ways, but here I have opted for the simplest.

We can see that all our configuration needs is a do_token value passed to it.

provider setups

Each of the providers that we declare in our terraform block will probably need some kind of setup — such as an api token like our Digital Ocean example.

For us we can see that the setting up of Digital Ocean’s provider needs only a token, which we are passing it from the variable that we will pass in via the cli command.

resource declarations

We then declare the “resources” that we want Terraform to create for us in our Digital Ocean account. In this case we just want it to create a single small droplet as a proof of concept.

The values I have passed to the digitalocean_droplet resource, would be great examples of where to use variables, potentially even with default placeholder values.

I have hard coded the values here for brevity.

Step 4 :: Run the apply command

Before running apply for the first time, we first need to initialize the project:

Bash

terraform init
# You should see some feedback starting with this:
Terraform has been successfully initialized!

You can also run terraform plan before the apply command to see what Terraform will be provisioning for you. However, when running terraform apply, it shows you the plan and asks for explicit confirmation before building anything. So I rarely use plan.

If you run terraform apply, it will prompt you for any variables that your main.tf requires — in our case the do_token variable. We could type it / paste it in every time we want to run a command. But a more elegant solution would be to use that custom bash script we created earlier.

Assuming that bash script is in our current directory — the Terraform project folder — run the following:

Bash

./myterraformwrapper apply

This should display to you what it is planning to provision in your Digital Ocean account — a single Droplet.

Type the word “yes” and hit enter.

You should now see it giving you a status update every 10 seconds, ending in confirmation of the droplet being created.

If you hard back over to your Digital Ocean account dashboard, you should see that new droplet sitting there.

Step 5 :: Bonus: destroying resources.

Just as Terraform can be used to create those resources, it can also be used to destroy them too. It goes without saying that you should always be mindful of just what you are destroying, but in this example we are just playing with a test droplet.

Run the following to destroy your newly-created droplet:

Bash

./myterraformwrapper destroy

Again, it will first show you what it is planning to change in your account — the destruction of that single droplet.

Type “yes” and hit enter to accept.

Next Steps

I love playing with Terraform, and will be sharing anything that I learn along my journey on my website.

You could start working through Terraform’s documentation to get a taste of what it can do for you.

You can even take a look at its excellent registry to see all of the providers that are available. Maybe even dig deep into the Digital Ocean provider documentation and see all of the available resources you could play with.

Just be careful how much you are creating and when testing don’t forget to run the destroy command when you’re done. The whole point of storing your infrastructure as code is that it is dead simple to provision and destroy it all.

Just don’t get leaving test resources up and potentially running yourself a huge bill.

Earned 1 trophy in Red Dead Redemption

1 bronze ·

Trophies
  • Evil Spirits

Listened to 4 tracks

Muse, Iron Maiden, Judas Priest and 1 more · 28m ·

Tracklist
  1. Hysteria · Muse
  2. Wasted Years · Iron Maiden
  3. Turbo Lover · Judas Priest
  4. Ratamahatta · Sepultura

2019 · 7 years ago

Listened to The Uncanny by Understanding Psycho

Listened to 10 tracks

Muse, Eminem, Lethal Bizzle and 6 more · 1h 5m ·

Tracklist
  1. Lose Yourself · Eminem
  2. Rari Workout (feat. JME & Tempa T) · Lethal Bizzle
  3. Running with the Boys · Lights
  4. Supermassive Black Hole · Muse
  5. Next Hype (Vocal) · Tempa T
  6. Knights of Cydonia · Muse
  7. Burnin in the Third Degree · Brad Fiedel
  8. Look Out (feat. Giggs) · Skepta
  9. All She Wrote · Kiefer Sutherland
  10. Death Stranding · CHVRCHES

Earned 1 trophy in Uncharted: Drake’s Fortune™ Remastered

1 bronze ·

Trophies
  • 100 Headshots

2018 · 8 years ago

Earned 1 trophy in Dead by Daylight 1/3

1 silver ·

Trophies
  • Near-Death Experience

2017 · 9 years ago

Listened to Meat Loaf

2 listens · 16m ·

Tracklist
  1. Who Needs the Young · Meat Loaf
  2. Speaking In Tongues · Meat Loaf

Listened to Scars On Broadway (UK Version) by Scars on Broadway

7 listens · 20m ·

Tracklist
  1. Serious · Scars on Broadway
  2. Funny · Scars on Broadway
  3. Exploding/Reloading · Scars on Broadway
  4. Stoner-Hate · Scars on Broadway
  5. World Long Gone · Scars on Broadway
  6. Kill Each Other/Live Forever · Scars on Broadway
  7. Babylon · Scars on Broadway

Listened to 6 tracks

Jim Steinman, Devlin | F64 [S2.EP5], Paloma Faith and 1 more · 30m ·

Tracklist
  1. SBTV · Devlin | F64 [S2.EP5]
  2. Bad for Good · Jim Steinman
  3. Lost Boys and Golden Girls · Jim Steinman
  4. Love and Death and an American Guitar · Jim Steinman
  5. The Architect · Paloma Faith
  6. Toxic · Britney Spears

Listened to Ed Sheeran

3 listens · 22m ·

Tracklist
  1. You Need Me, I Don't Need You · Ed Sheeran
  2. A64 [S2.EP16]: SBTV · Devlin | F64 #2
  3. You Need Me, I Don't Need You · Ed Sheeran

Listened to The Architect (Deluxe) by Paloma Faith

26 listens · 1h 49m ·

Tracklist
  1. The Architect · Paloma Faith
  2. Guilty · Paloma Faith
  3. Crybaby · Paloma Faith
  4. I'll Be Gentle · Paloma Faith
  5. Kings and Queens · Paloma Faith
  6. Surrender · Paloma Faith
  7. Warrior · Paloma Faith
  8. 'Til I'm Done · Paloma Faith
  9. Lost and Lonely · Paloma Faith
  10. Still Around · Paloma Faith
  11. WW3 · Paloma Faith
  12. Love Me as I Am · Paloma Faith
  13. Power to the Peaceful · Paloma Faith
  14. Tonight's Not the Only Night · Paloma Faith
  15. My Body · Paloma Faith
  16. Price of Fame · Paloma Faith
  17. Hang on Me · St. Vincent
  18. Pills · St. Vincent
  19. Masseduction · St. Vincent
  20. Sugarboy · St. Vincent
  21. Los Ageless · St. Vincent
  22. Happy Birthday, Johnny · St. Vincent
  23. Savior · St. Vincent
  24. New York · St. Vincent
  25. Fear the Future · St. Vincent
  26. Young Lover · St. Vincent

2016 · 10 years ago

Listened to 12 tracks

Lady Leshurr, Jason Graves, Big Narstie and 2 more · 38m ·

Tracklist
  1. I Shall Rise (From "Rise of the Tomb Raider") · Karen O
  2. Adventure Found Me · Jason Graves
  3. The Scavenger's Den · Jason Graves
  4. Exploring The Island · Jason Graves
  5. The BDL Skank · Big Narstie
  6. Hello Hi · Big Narstie
  7. Intro · Akala
  8. Welcome to Dystopia · Akala
  9. Queen's Speech 1 · Lady Leshurr
  10. Queen's Speech 2 · Lady Leshurr
  11. Queen's Speech 3 · Lady Leshurr
  12. Queen's Speech 4 · Lady Leshurr

Listened to Born to Die - The Paradise Edition by Lana Del Rey

25 listens · 2h 4m ·

Tracklist
  1. Born to Die · Lana Del Rey
  2. Off to the Races · Lana Del Rey
  3. Blue Jeans · Lana Del Rey
  4. Video Games · Lana Del Rey
  5. Diet Mountain Dew · Lana Del Rey
  6. National Anthem · Lana Del Rey
  7. Dark Paradise · Lana Del Rey
  8. Radio · Lana Del Rey
  9. Carmen · Lana Del Rey
  10. Million Dollar Man · Lana Del Rey
  11. Summertime Sadness · Lana Del Rey
  12. This Is What Makes Us Girls · Lana Del Rey
  13. Without You · Lana Del Rey
  14. Lolita · Lana Del Rey
  15. Lucky Ones · Lana Del Rey
  16. Ride · Lana Del Rey
  17. American · Lana Del Rey
  18. Cola · Lana Del Rey
  19. Body Electric · Lana Del Rey
  20. Blue Velvet · Lana Del Rey
  21. Gods & Monsters · Lana Del Rey
  22. Yayo · Lana Del Rey
  23. Bel Air · Lana Del Rey
  24. Mustapha - Remastered 2011 · Queen
  25. Fat Bottomed Girls - 2011 Remaster · Queen

Listened to 8 tracks

Marilyn Manson, Skold, Lorde and 1 more · 26m ·

Tracklist
  1. Devour · Marilyn Manson
  2. This Is Halloween · Marilyn Manson
  3. Pretty as a Swastika · Marilyn Manson
  4. Don't Pray For Me · Skold
  5. Melt (feat. Kilo Kish) · Chet Faker
  6. Royals · Lorde
  7. Tennis Court · Lorde
  8. Better The Devil · Skold

Listened to The High End of Low (International Version) by Marilyn Manson

8 listens · 41m ·

Tracklist
  1. Leave A Scar · Marilyn Manson
  2. Four Rusted Horses · Marilyn Manson
  3. Arma-Goddamn-Motherfuckin-Geddon · Marilyn Manson
  4. Blank and White · Marilyn Manson
  5. Running To The Edge Of The World · Marilyn Manson
  6. Jolene · Miley Cyrus
  7. 23 (Explicit) ft. Miley Cyrus, Wiz Khalifa, Juicy J · Mike Will Made-It
  8. Jolene · Miley Cyrus

2012 · 14 years ago

It turns out that my beginnings of my drawing app re-coding has become a nice base from which to start cross device canvas based apps.