December 31st, 2020
It’s no secret that I love mince pies. But due to the pandemic I’m stuck in Shanghai this Christmas and the seasonal delicacy is hard to source. Now everyone who’s lived in China knows you can buy anything on Taobao, and sure enough I found a 代购 daigou specialising in British foodstuffs.
Unfortunately the price is around 5-10x what you’d normally pay in the UK. Feeling desperate I bought one box of Waitrose pies anyway, for a total of ¥154 with shipping (about £17). It eventually arrived two days before Christmas and a joyous time was had by all.
A delicous Waitrose regular mince pie
December 31st, 2020
What a terrible year 2020 was. With swimming, running, and gym all out I tried to keep fit by power walking this loop around my local neighbourhood. I’m recording it here for posterity.
This was mostly a night time activity due to the extreme heat in the summer. At one point you pass under this rather impressive three layer elevated interchange.
December 27th, 2020
A few years ago I thought I had finally collected all the classic Lego pirates. But no! Lego have just recently release a new set in the traditional style! Obviously I had to get it for Christmas and I wasn’t disappointed…
Thank you Santa
The set has over 2500 pieces and I spent two days building it. I’ve literally never spent that long on a Lego set.
The island form
It’s supposed to be a pirate base made out of an old pirate ship that ran aground.
Pirate captain and pirate pub
You can actually build two models and switch between them without much effort: the three boat parts clip out and can be assembled into a whole pirate ship.
The boat form, resembling the old Lego pirate ship
December 23rd, 2020
Last weekend I went out for a walk to Minhang sports park, a large green space in the west of Shanghai. Although I’m not sure what qualifies it to be a “sports park” rather than just a regular park. Minhang is the name of this particular suburb.
Minhang sports park
Afterwards I kept walking south to Xinzhuang and then even further south to a part of the city I’ve never visited before.
This area is a bit industrial and there wasn’t much interesting to look at except metro line 5, which I’d never visited before. It’s elevated above the track and has this walking path underneath it at least part of the way.
Underneath line 5
December 19th, 2020
It can be agonizing to pick a good colour scheme for your shell prompt. Especially when you have 256 or more colours to pick from. So rather than waste my time I decided to embrace serendipity and have my shell pick a random colour when it starts. The results are rather pleasing, as you can see below, and if I don’t like a particular colour then it will only last as long as that particular shell.
It also helps to visually distinguish different windows that are being used for different tasks, and root shells are coloured an alarming shade of red. Just pop the following in your .bashrc
.
PS1=${SSH_CLIENT:+$(hostname -s):}'\w \$ '
case "$TERM" in
*-256color)
if [ "$UID" = 0 ]; then
color=196 # Red
else
color=$((16+(36*(1+RANDOM%5))+(6*(1+RANDOM%5))+(1+RANDOM%5)))
fi
PS1='\[\033[1m\033[38;5;'$color'm\]'$PS1'\[\033[00m\]'
;;
*-color)
if [ "$UID" = 0 ]; then
color=31 # Red
else
color=$((31+RANDOM%8))
fi
PS1='\[\033[1m\033['$color'm\]'$PS1'\[\033[00m\]'
;;
esac
unset color
For *-256color
terminals the codes above 36 are a 6x6x6 RGB colour cube. This script avoids darker colours but you can tweak it to your liking. Most modern terminals also support a true colour escape sequence giving full 24-bit colour, but 120 different shades is surely enough for anyone.
December 12th, 2020
The air quality has been getting worse and worse the last few days. But today it reached new lows of “very unhealthy”. I think the icon is recommending me to wear a gas mask. Perhaps it should be comforting that there’s still as “hazardous” level beyond this.
I think I’m going to stay inside