mattypenny

It’s a beautiful thing

Salisbury cathedral this evening

I really enjoyed G’Wed

Like a mixture of Inbetweeners, Derry Girls and Grange Hill, but ruder, and Scousier

Worth putting up with the ITVx player for…which is high praise, actually 📺

cast of g'wedmore cast of g'wed

Setting up a file-specific (not filetype-specific) colorscheme in vim

Setting up a file-specific (not filetype-specific) colorscheme in vim is a two step process.

First, you need a ‘modeline’[^1] in the file like this: [^1] a ‘modeline’ is a comment with vim instructions in it. My actual modeline for this file is ‘# vim: ft=readme syntax=markdown tabstop=2 shiftwidth=2 softtabstop=2 expandtab’. There’s some explanation of modelines here: https://vim.fandom.com/wiki/Modeline_magic

# vim: ft=readme

‘ft’ here is, somewhat confusingly given my post’s title, short for filetype. The name of the filetype is kind-of arbitrary. It’s probably best to be descriptive, and better if it doesn’t correspond to an actual filetype like .md or ‘markdown’ or ‘txt’

Second, you need like this in your vimrc

autocmd FileType readme colorscheme peachpuff

Why would I do such a thing

I have a couple of ‘big old text files’ open most of the time.

One is for general notes, and a record of what’s happened during the week. The other is when I’m doing a chunky-ish bit of coding which records decisions, todo’s, worries and web-clippings which are specific to that code

Having a separate colour scheme just makes it handier to find either of the files I want when I’m alt-tabbing through my 103 open windows

#TodayILearned that the word ‘cockamamie’ is possibly related to ‘decalcomania’ which has to do with ‘decals’ - stick on decorations, or tattoos.

www.etymonline.com/word/cock…

I’m putting together a chronology of stuff thats happened and stuff i’ve done, or been to..and i enjoyed memories of the Elephant Fayre

https://www.ukrockfestivals.com/elephant_fayre_1981-86.html

1983 elephant fayre poster1984 elephant fayre poster

#TodayILearned that the passengers in the ‘Miracle on the Hudson’ got $5,000 compensation for lost luggage, a refund for the price of their ticket, and a letter of apology

BBC Witness History - Miracle on the Hudson

aeroplane in the river hudson

Hoping everyone has a super Tuesday

#TodayILearned that the 1967 Beatles Christmas record was produced by Kenny Everett

Danny Baker - tracing the Beatles through their Christmas record

Kenney Everett in his punk character

The Spotify graphic for Neil Diamond is a bit ‘1984’ 🎵

Neil Diamonds face, looking like 'Big Brother is Watching You'

There’s something particularly sad about the death of one half of a double act

The stations on this line sound like they should be in the Lord of the Rings

trainmap showing Par, Lostwithiel, Bodmin, Liskeard, Saint Germans

#TodayILearned that Cinderella’s slippers may have been squirrel fur (‘vair’) rather than glass (‘verre’)

CINDERELLA’S SLIPPERS: GLASS OR SQUIRREL FUR?

Poster, I think, from Disney's live action Cinderella

This is definitely better than the view from the M5

the view from the train between  Exeter and newton Abbott

Sir Keir/Kier Starmer needs to be Prime Minister for at least 10 years for me to have any hope of me spelling him with any confidence, or even with any consistency

Sir Kier giving him the thumbs up

When Kier Starmer gets on the blower and asks me what he should do in government, I shall tell him to make February the 29th a Bank Holiday

It’s a suitably cautious policy and I commend it to the house.

Kier Starmer giving a thumbs up at some rally

#TodayILearned the phrase "cheese it-the cops!"

#TodayILearned the phrase cheese it-the cops!

“A warning that the police were coming. “Cheese” might be a variant of “cease.” It might also come from the cheese course coming at the end of dinner; in the sense that with nothing else ahead, it’s time to leave. In either event, “cheese it—the cops!” was a staple of mid-20th-century crime novels and films, as well as such movies as The Dead End Kids and The Bowery Boys.”

The Free Dictionary

If you squint hard enough, and use your imagination, you can just about make out the ruins of Sherbourne Old Castle, which belonged to Sir Walter Raleigh, the bloke who was supposed to have brought tobacco to Europe, but maybe didn’t

Bob Newhart - Nutty Walt

Crappy photo taken from the train of Sherbourne Old Castle through some trees

#TodayILearned that one way of getting a list of data available from Microsoft Graph API is to type ‘graph.microsoft.com/v1.0/user… into Graph Explorer, and see what show’s up in the Dropdown

the dropdown in Graph Explorer

I bought an old postcard of my chums from Salisbury Museum - the Giant and Hobnob. I’m just about old enough to have seen them going through the City

Postcard showing the Giant and Hobnob

Agree with virtually every word of this

A more sympathetic take on Chelsea’s defeat

#cfc #ChelseaFC ⚽

Vim commands to write out parameter list

Executive summary :)

For each line


0

D

PP

From the colon prompt:


%s/^  */    write-dbg "`

%s/  *\$/: <\$

%s/$/>"

%s/,//g

The gory details

Starting with a parameter clause like this:


Param(
     $Parameter1,
     $Parameter2,
     $Parameter3,
     $Parameter4
)

The manual bits

First, take off the ‘Param(i’, and the bracket at the end

Second, for each line do this:

0
D
PP

… to get:

     $Parameter1,     $Parameter1,
     $Parameter2,     $Parameter2,
     $Parameter3,     $Parameter3,
     $Parameter4     $Parameter4

The colon prompt bits

Replace spaces at the front with the write-dbg, a double-quote, and then a backtick. The backtick is because I need to escape the name of the variable

:%s/^  */    write-dbg "`

This gives:

    write-dbg "`$Parameter1,     $Parameter1,
    write-dbg "`$Parameter2,     $Parameter2,
    write-dbg "`$Parameter3,     $Parameter3,
    write-dbg "`$Parameter4     $Parameter4

Replace the spaces between the repeated variables with ‘: <’

:%s/  *\$/: <\$

….giving:

    write-dbg "`$Parameter1,: <$Parameter1,
    write-dbg "`$Parameter2,: <$Parameter2,
    write-dbg "`$Parameter3,: <$Parameter3,
    write-dbg "`$Parameter4: <$Parameter4

End the string:

%s/$/>"

….which gives:

    write-dbg "`$Parameter1,: <$Parameter1,
    write-dbg "`$Parameter2,: <$Parameter2,
    write-dbg "`$Parameter3,: <$Parameter3,
    write-dbg "`$Parameter4: <$Parameter4

Finally get rid of the commas

%s/,//g


Leaving:

    write-dbg "`$Parameter1: <$Parameter1>"
    write-dbg "`$Parameter2: <$Parameter2>"
    write-dbg "`$Parameter3: <$Parameter3>"
    write-dbg "`$Parameter4: <$Parameter4>"

#TodayILearned that in 1929, the USSR replaced the 7 day week with a 5 day week, with a fifth of the workforce resting on any given day

This was a good episode to listen to in Leap Week :) 🎙️

Why do we have a seven-day week?

Lee Anderson MP thinks that Sadiq Khan is “controlled by Islamists”

I think Lee Anderson is controlled by idiots

https://www.theguardian.com/politics/2024/feb/26/lee-anderson-stands-by-attack-on-sadiq-khan-and-launches-fresh-broadside?CMP=Share_AndroidApp_Other

That was a shame….could have easily gone the other way. We’ll be back⚽

I just saw Wicked Little Lies….absolutely adored it. It won’t be everybody’s cup of tea, but probably my favourite film so far this millennium! 🎥

It’s worth avoiding spoilers

Film poster