Skip to content

Instantly share code, notes, and snippets.

View gregharvey's full-sized avatar

Greg Harvey gregharvey

View GitHub Profile
@gregharvey
gregharvey / cannot-sell-my-ev.md
Last active January 8, 2025 09:46
I won't be able to sell my old EV!

I won't be able to sell my old EV!

More EV FUD debunking. A friend triggered me by saying "I'm not buying a second-hand EV, who would buy a third-hand one? I'll be stuck with it!" That's utter nonsense, I thought, there are quite a lot of third-hand Renault Zoe/Nissan Leaf/Tesla Model S around these days. But I kept my mouth shut and checked it out first.

To carry out a bit of research I needed to pick a market. I picked the UK just because it's a market I'm very familiar with. Tackling specifically the "I'm going to be stuck with a car nobody wants" angle, let's forget all the running cost arguments (we know EVs are cheaper to run in almost all circumstances, and cleverer people than I have done the maths on that). The focus here is on depreciation, because the premise of my friend's comment is an old EV will be so devalued as to be prac

Stop X

Why did I create this? I found myself watching the awful news story about the tragic attack on the Magdeburg Christmas market unfold on various live news channels and something struck me. Something actually deeply disturbing, if you take a step back and look at it. Not as obviously disturbing as the event in question, of course, but every single global and local politician was being quoted on X.com. All of them! The German chancellor, the British Prime Minister, the French president, the Saudi foreign ministry, the president of the European Commission, the list goes on and on. On every news channel, the BBC, France 24, Al Jazeera, again the list goes on... "...said on X..."

On X.com. Everything on X.com.

To understand why that shocked me, let's step back a second and consider what X.com is.

It's a privately owned American corporation that makes most of its money through online advertising. It is a closed platform operated entirely at the whim of its owner. It exists purely to make the person who o

@gregharvey
gregharvey / localgovdrupal-cfn.md
Last active April 19, 2021 17:02
LocalGovDrupal on CloudFront blog

Although I work for an AWS partner, I've always shied away from AWS CloudFormation, their orchestration technology. However, when I got talking to Will at LocalGovDrupal about reducing the barrier to entry for smaller organisations who want to use the distribution as a starting point, a plan formed. Perhaps the AWS Marketplace would be a good way to allow other councils to find and try out LocalGovDrupal?

The kicker of course is to put something in AWS Marketplace you pretty much need to build it with AWS CloudFormation. CloudFormation basically provides a YAML or JSON formatted means of describing any AWS service so it can be automatically set up and configured, and as a result your infrastructure can be saved in code, in much the same way as the popular Terraform from Hashicorp does, not to mention the AWS Ansible modules. After some Googling I fell upon the AWS Reference Architecture project for Highly Available Drupal. It was pretty out of date, but nice and complete, even with DNS handling and SSL and C

@gregharvey
gregharvey / .bashrc
Created June 28, 2017 07:15 — forked from mcjim/.bashrc
Git branch, dirty and stash state in Bash prompt.
# Quick fork by @mcjim to add stash status and tweak to suit his style.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# host dir master $ # clean working directory
# host dir master* $ # dirty working directory
# host dir master*^ $ # dirty working directory with stash
# host dir master^ $ # clean working directory with stash
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working tree clean" ]] && echo "*"
@gregharvey
gregharvey / ffs.txt
Created February 14, 2017 15:00
This is what I have to put up with...
Feb 14 15:47:17 <@instanceofjamie> gregharvey: I'm going to hold out for matason to come back. I don't know if I have to run this on one or both app servers.
Feb 14 15:47:31 <@gregharvey> k
Feb 14 15:48:22 <galooph> ♬♪♫ you're holding out for a hero ♫♪♬ “ヽ(´▽`)ノ”
Feb 14 15:49:14 <@instanceofjamie> ♬♪♫ tilt he end of the night ♫♪♬ “ヽ(´▽`)ノ”
Feb 14 15:49:19 <@instanceofjamie> join in, andymartel
Feb 14 15:50:11 <andymartel> ♬♪♫ He's gotta be strong and he's gotta be fast ♬♪♫ “ヽ(´▽`)ノ”
Feb 14 15:50:19 <@instanceofjamie> \m/
Feb 14 15:50:28 <galooph> bring it home, emlyn
Feb 14 15:50:35 <@instanceofjamie> NOT WITH A JOKE
Feb 14 15:50:42 <galooph> glol