[ Content | Sidebar ]

Minhang Loop

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.

New Lego Pirates Ahoy

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

Filed in musings - Comments closed

Minhang Sports Park

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

Best Shell Prompt Colour Scheme

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.

Filed in linux - Comments closed

Air Pollution

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

Dian Shan Lake

November 16th, 2020

Not really a single lake but a connected set of small lakes in the far north west of Shanghai, where it meets the next city, Kunshan.

Although it’s not far from the end of line 17, we’re about two hours away from the city centre so it feels very peaceful and rural.

A Problem at the High Sea

November 12th, 2020

Yesterday my inbox received an urgent plea from Mr Leslie Simpson. My dear friend Leslie has run into a ghastly problem at the high sea.

Please i am contacting you because of the problem we have now at the high sea, now the situation here is getting worse and we’ve done all we could to put the brain box of the ship in order but to no avail, and beside we just received information from the Signal house that there are sea pirates from Indonesia blocking the sea. They are about 312 KM away from us and the nearest place for this Ship to anchor is Labuan Island somewhere in East Malaysia. As it is now, we are no longer safe because we fear the pirate’s attack because the ship is very slow now. We have called for a rescue team but we are yet to get a response from our headquarters.

The captains of the Ship have announced that all passengers should offload their goods for another means of transportation as the SHIP will duck here for other weeks until its safe to continue sailing.

I am intrigued as to what problem has befallen the brain box of the ship. But I am glad Leslie managed to evade the sea pirates and reach Labuan Island safely.

My problem now is my documents and my earn time savings and little part of the money I also took as loan are with me here in the ship, it is which I kept in my cabin safe box. I do not want it stolen from me in the event of any attack. My plan was to use this money USD$23.4 Million United State Dollars to buy Metal oil in drums in Australia and supply to a company in Mexico. I already had a contract agreement with and the documents are for my contract so I have to be careful.

I have discussed with one of the security company here. They will proceed delivery immediately I get a confirmation from you to assist me in receiving this money because there is no bank here and I don’t want to lose the money to sea pirates because I know how I suffered for it.

Now follows several paragraphs about how I can help Leslie by storing the money in my bank account, and the information I need to provide him for this. I hope this security company is as trustworthy as I am.

I am sitting by the seashore now and waiting for your quick reply. Please I need your prayers this time because we are in a state of confusion praying that nothing happens to us.

Sadly I think the state of confusion will persist for a good while longer.

Filed in musings - Comments closed

Paotaiwan Wetland Park

October 31st, 2020

Paotaiwan wetland park (炮台湾国家湿地公园) is a small nature reserve in Shanghai’s BaoShan district on the southern bank of the Yangtze river. It’s quite peaceful compared to most of the city’s tourist attractions and even on a Sunday afternoon it wasn’t particularly busy. I liked the viewing pier where you can watch the big cargo ships sailing by. You can travel there either on foot or by bus from Shui Chan Road (水产路) station on line 3.

First sight of the Yangtze river

I initially thought the name 炮台湾 (炮 cannon, big gun; 台湾 Taiwan) was an alarming nationalist call to blow up Taiwan with a cannon, but apparently it’s 炮台 “gun emplacement” 湾 “bay”, after the fort that guards the mouth of the Yangtze river, so there you go.

The titular gun emplacement

Shanghai Metro Line 3

October 30th, 2020

Line 3 has got to be Shanghai’s most iconic metro line. I’ve even seen it featured in some promotional tourist ads. To my knowledge it is the only line to be entirely elevated above the ground and riding on it gives some great views of the city.

But what is it like to walk nearly 26 miles underneath it? Today I can reveal the answer is: a bit dull.

I walked the route over three afternoons which I’ve merged together in the map above.

To my great shame I didn’t make it quite to the end, stopping one station short at Tie Li Road. The last section really wasn’t great for walking being just a sparsely populated industrial area.

The problem is, unlike line 12 which I walked last year, the route doesn’t pass through the city centre or cross the river, and most of the latter half runs parallel to a large noisy highway. So there isn’t much in the way of scenery apart from the elevated concrete structure itself. And you can’t even really see the trains.

But it wasn’t a total loss as I got to visit Baoshan district for the first time. Another tourist attraction there will be the subject of a later post…

Yangpu Bridge

October 13th, 2020

I’ve wanted to walk to the Yangtze river for a while now, seeing as it’s only just a bit north of Shanghai. I tried last week but the attempt ended in failure. As I got to the edge of the city I found myself walking through an endless expanse of warehouses and docks, which was not a lot of fun. It also wasn’t obvious if I’d be able to see much once I finally got there so I gave up and went home.

Typical scenery

Before the industrial wasteland there was a nice footpath along the Huangpu river. I passed another impressive bridge, the Yangpu bridge. This one is the 38th longest cable-stayed bridge in the world. Shanghai really is a great place for bridge spotters.

Yangpu bridge