Main menu:

Site search

Categories

March 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Tags

Blogroll

Words to the wise – recreating Unix’s touch function in Windows

Creating an empty file.

type nul >> your_file.txt
copy /b filename.ext +,,

The following works through a set of files in a directory and refreshes the date of them.  Useful if your company has a policy for deleting old files automatically, using Powershell.

(ls your-file-name-here).LastWriteTime = Get-Date
Get-ChildItem . * -recurse | ForEach-Object{$_.LastWriteTime = get-date}

https://docs.microsoft.com/en-us/sysinternals/downloads/file-and-disk-utilities

If you do this, it may be worth considering time stamping your files: textFile1_20180502.txt for example.

Qualys updates checks against Drown and cipher suites

Changes to TLS protocols

Jet lag meant I reverified my site against Qualys’ SSL Server test.
New concerns have lead to them tightening their tests to help you protect your identity on line.
In particular, forward secracy. Check out how to help set your web server correctly!

Fixing the face

Having found I required an operation, we’re then looking at some fundamentals of how the NHS works.

There are two basic types of operation: scheduled/elective or emergency.  Because my operation was the result of an accident, although it wasn’t life threatening, it was deemed a “planned emergency”.  I was being admitted Sunday for a hopeful slot on Monday.

Day 2 after op and subsequent days

Day 2 after op and subsequent days

It has to be said, things get a little silly.  Pre-op without a scheduled time makes for an interesting situation when you’re type 1.  Having established that paracetamol was off the menu, the other interesting thing was pain relief.  Ibuprofen without food can chew up your stomach lining.

The nurses all loved my Libre though.  Hourly ob’s were easily established and despite not having food, were easily worked through with nudges on my basal.  Sunday night I was moved four times to different wards and beds.  But otherwise there were no incidents.

Monday the slot came up early afternoon – so the drip was properly set up.  I dosed most of the day before the op, enjoyed the trip down to theatre – apparently one of the nurses had injured himself in a similar way (although in a fight!) and the operation had made a huge difference.

Of course, I was soundly asleep.  They give good painkillers after such a procedure and Monday afternoon and evening were spent dozing.  My husband came in a couple of times but I really can’t remember now.

I had my emergency kit with me – a couple of pairs of pyjamas, socks, slippers, some clothes for going home with and my tooth paste, book and hairbrush.  I look a mess, but I was advised not to wash my hair for a couple of days to allow the stitches to do their work.  I was very keen not to rip the stitches out with my brush either!

The nurses were all great.  Food was not an option Monday and Tuesday am while I was hungry, I didn’t really have the capability of opening my jaw wide enough to eat yet.  I had a salad for Tuesday lunch taken at a snail’s pace.  Tuesday afternoon, I was taken up for an x-ray and you can see how much movement I have back from the photo.

I grinned at everyone while I was being wheeled through the hospital but I got some really odd looks back.  Which felt very odd, I probably looked like I had been in a fight but that really isn’t the point.

The surgeon was happy with the outcome, as was I so three hours later I was discharged from hospital with strict instructions not to lie on that side of my face in bed.  Definitely wasn’t happening any time soon!

Eating was much better, as the days passed, the swelling went down and my feeling returned.  It’s not as it was yet, but it’s all coming together.

I broke my arm in 2009 and that took best part of a year to fully heal, and I can feel things getting better everyday even in March, five months later.

I had damaged my teeth and my bike was a mess.  I had to fight with the insurers to get it fixed rather than have a new one: £180.  New lenses for my glasses were £480 and fixing my teeth was nearly a £1000.  (Having never had a filling, I had root canal surgery on my front tooth in December).

I wish I had been a little more focused on my dental health – it’s taken a while to sort everything out.  My sinus on the right side is potentially still blocked too.  That may need sorting.

I have been incredibly lucky.  It could have been a very different story.

Life moves on

Backup your blog. I didn’t so this post follows up from one I have lost. I will get round to re-writing it.

In the meantime, on the 27th August 2017 I came off my push bike at around 20 mph failing to make it up a supposedly drop curb. Resultant head injuries were identified while A&E were working out if I had fractured my neck.  Having had my eyes cleared for anything more than severed bruising a fractured orbital socket and zygomatic on the right side of my skull on the night, I left A&E with two appointments: one for the ophthalmic department on Tuesday and one lined up with MaxFax (Maxillary facial) at Ipswich Hospital on the 1st September.

O…K…..

The biggest issue with the whole broken face was eating.  Every time I opened my jaw, only putting it back into place with my hand seemed to work.  By the end of day 2, I had worked out that the concussion was not easing quickly enough and had insert one of my remaining Freestyle Libre sensors and life was suddenly much easier – testing could be done with me being conscious and lying on my left side meant I could sleep.

Day 3, I was cleaned and on my way to see what news there was to be had on whether I had really damaged my right eye.  Short waiting time, and I am in a testing room.  In it was a grid with an angled mirror between it.  All I had to do was identify with each eye where certain dots were.

The upshot was I still had double vision. I was accommodating it well (so I could pick things up and walk in a straight line) but when the bruising went down it would probably return to normal. The earlier tests on Sunday had proven the retina was still attached to the optic nerve, so it was just a waiting game.  As you can see in the photos, the bruising and swelling was still quite impressive at this stage!

Day 2 and 3

Day 2 and 3

I managed 75% of a tin of soup that day for lunch!

The big difficulty with the Freestyle Libre is the fact, like many other continuous glucose monitoring systems, is that paracetamol (acetaminophen) and similar drugs can prevent it from ready current results (effectively blocking it from working).  To have all the benefits of just reading the values, I have to miss a major group of painkillers.  During this period I was religiously taking ibuprofen (advil) and sleeping – with the double vision watching TV or reading a book were not an option 😀

By Thursday, the swelling had gone down enough to allow a good look in the mirror and a little more time awake in the day.  I did have a moment where I thought, “OMG, I am never going to look like I did again”.  So I sat down and wondered if that matter and despite the fact it was painful, I did smile – it didn’t matter, really.  The scabs would go, I may have some scarring, but it was vaguely functional, the pain would stop, it didn’t, in the grand scheme of things, matter.  My family would still love me and I was still me.

Friday was the long awaited MaxFax appointment.  My husband took me and I checked in while he found a parking space.

“We don’t have you on our list today?”
“You must have: this is the appointment that was set up on Sunday…” I presented my appointment card.
“Take a seat, I’ll find out what’s going on.”

Apparently, my appointment had been moved to the day before, only they hadn’t let us know!  I channeled my inner, I don’t really care just sort this out please and to be honest, I probably looked quite mean 😮

We got slotted in and my scan from Sunday was examined.  A request for an x-ray was made and we joined the queue.

Given my general appearance (and I had put on a frock for the appointment) I was manhandled while the 2D images were taken.  After the man approached me for the second set I requested that I was handled more gently as I had broken quite a few bones in my face.

“We don’t know that yet!”
“Yes we do: a displaced fracture of the maxillary sinus, fractured zygomatic and orbitol.  The scans from Sunday proved that!”
He disappeared and came back into the x-ray suite and apologised and was much more gentle taking the last three films.

We’re now in early afternoon, and we’ve grabbed some lunch before heading back into MaxFax.  The young surgeon believes there is a lot to be gained performing a Gillies Lift and potentially fixating the zygomatic.

Basically, a cut would be made in my hair and a lever would allow the surgeon to push out the depressed fractured max sinus.  He would also go in to my zygomatic arch through the scar below my right eyebrow and fix that with a small plate – that wouldn’t survive any kind of knock but would allow enough stability for me to able eat and speak and generally function.  To say I was keen to proceed would be an understatement!

It wasn’t without risks – damage to the nerves could result including the eye muscles.  As my nerves were trapped in my face by the injury, I appreciated the implications were that it could be permanent.  As I was an emergency admission, the plan was to turn up on Sunday evening and wait for a slot.

Joys of travel

As you can tell from my blog, I love travelling.

I have a motorbike, push bike, car (ICE and EV), canoe and am reasonably happy to use public travel though buses and trains do tend to make me travel sick 😀

I used to love flying, I have had two flying lessons though after 29th Jan 2009, I am unlikely to be allowed a flying license.

The reason I am writing this is to share my travelling experience yesterday.

Tuesday I flew to Edingburgh for a business meeting.  Very uneventful, unusually, the A12 was perfect and I got to Stansted by car with no issues.  The flight was on time and while security was its fun self, I got someone to pat me down in the secluded little room.

When 9/11 first happened, body scanners and my pump were reasonably happy together.  I had a 3rd gen pump and the manufacturers were happy that the airport body scanners did not pose an issue.

As I have become more of a cyborg, that is less convenient.  As the loops have closed, the manufacturers of the various equipment are less happy about the effects of full body scanners on this increasingly more sensitive equipment.  The pump makers have never been happy about putting the pumps through xray machines but now I am wearing CGMS, that’s pretty moot.  The sensors are really not up to it and at £45 a shot, I cannot afford to lose one for a trip.

Security people are also much less happy about a risking in public or indeed by members of the opposite sex (though I suspect happy for a gay woman to risk down a female suspect)!

So now I have to waste time having to sign a waiver and go off to a private room.  It takes about 47mins end to end (if women are around to do the task).  During daylight hours slightly less.

It doesn’t help that I travel alone much of the time for business.  Since my bike accident in Aug, my face needs gunk to try to minimise the scaring and promote the muscle healing that is still going on but my smile is becoming more symmetrical gradually 🙂 ).

I am twittering for help.  I have nothing to hide, I am happy to be frisked and wiped down in public but my clothing is not helping to prove that argument.

This is what I need:

  1. A dress which can switch to being transparent with a hole to allow my pump to pass through it, velcro closure for that port would be ace.  A pocket for the pump too would be good.
  2. A decent bra without any metal lacy enough to show I am not hiding anything but that covers others modesty.
  3. I can wear pants/knickers to save blushes especially for when I am menstruating.

Is anyone sitting there with the imagination and willingness to help, please?

You sound really busy, how do you fit it all in?

Working mum, full time specialist in my company, STEM ambassador, advanced motorcyclist, mentor..

I ask for help!  I cannot do everything, so I employ a cleaner.  I have a good relationship with my endocrinologist, my GP and my pharmacist, who help me to keep alive.

I do plan.  I do prioritise.  Sometimes, I have  to say, not today, how about tomorrow/next week/next month?

I get three days a financial year from my employer which I use to be a STEM (science, technology, engineering and mathematics) .  I get to say which things I do, and as time is precious I do pick the big bang things.  The sessions I’ve really enjoyed have been talking about what it is like to work as a software engineer, computer scientist or a manager in my company.

For me, as a youngster starting out and making the choices about subjects, college versus university, A levels versus BTEC, apprenticeship versus job versus further and higher education, would have been invaluable.  I should have left school at 16 but thought my only real choices were A levels.

There are always choices: it is up to us what we do with our time!

For me those priorities are my family, my work, my friends and then everything else.  To allow me to do that, I take care of my body and my mind.

Have a happy new year!

Two wrongs do not make a right

We moved into our current home in 2013.  I had watched it being built in 2006 as I learnt to ride my motorbike and remembered the disappointment when I realised it would be a chalet bungalow.  What a shame!

When we were looking to move in 2012, it was on the market and the photos did not really do it justice but I remembered looking round it on a cold late November day.  Like our previous house, it had a surprisingly big back garden.  Unlike our old place it had a laurel hedge surrounding three sides of the garden.

You either see the growing prowess of laurel hedges as a boon or a pain.  Our back garden backs on to a main road, the A1214, and despite having to cut it often to keep on top of it, the privacy is wonderful.

lollipops

lollipops

Early on we decided to keep that. The hedge on the right side of the house, again backing on to a road, we have “lollipopped” as seen below. The benefits are many, much less to manage for the plants and it does “bonsai” them!

That left the third edge, growing in front of a drive to our neighbours house, these seemed to be the oldest part of the hedge and on the day we moved in, it reached nearly 8′ in height.

I spent three months researching how to remove a 13 piece laurel hedge.

Not a trivial exercise.  I started by getting the hedge back under control – having had a hedge a couple of houses ago, I had loppers, trimmers and shears.

Once the hedge was at 5′ high, and a house warming party later, I started, over five weekends, de-foliating the trees.  Five black bin bags full of material we couldn’t put into our compost bin (diameters matter when it comes to branches) I had some stumps.

It’s that an awful lot of effort?

When it comes to managing hedges and trees, there are discussions regarding species on whether they can be coppiced.  In the days before central heating and ready supplies of coal or gas to heat houses, wood was managed to provide heating material.

Plants like laurel have a readily rising sap which means whatever the time of year, cutting a branch off signals the plant to produce new growth at that point or any available junction point on the plant.

This makes it really hard to kill laurel if you decide you change your mind about wanting it.

Having cut the trees down, I poisoned the stumps.  Everything I saw a piece of new growth, I cut it off and poisoned the remaining stump.

Six months after the initial dose of stump killer (yes, seriously, that’s what it is called), I had a bunch of dead stumps.

That takes us to early 2015.  Life stalled the project for a while but as the poison is pretty good as it doesn’t contaminate the remainder of the soil, so I grow pansies, spring bulbs and Persian buttercups.

Summer 2016.

This summer has been amazing in the garden.  Having left the laurel stumps for a couple of years, the time was ready to remove them from their bed.

The previous summer I had bought the tools of the trade, a mattock and pick axe.

Unlike a spade, the mattock has a couple of blades to help the wielder to get underneath the roots of the plant to be removed. Once you have that access point, a pick axe can provide a little more leverage (GCSE physics is your friend here).

 

Root ball

Root ball

Stump zero

I pick my quiet weekend.  Sunday morning, while my husband was cooking the chicken, I started work with my mattock.  Forty minutes later it still was in its place.  While there is no single long tap root, laurel does send out some “bracing” roots.  A pair of secateurs soon releases the roots and with the help of my husband and son, we soon have the root ball separated from the ground.

A hole and a mattock

We do three more that afternoon before calling it a day.

The next weekend we do five more and finish the job on the third weekend.

We manage to salvage most of the hyacinths and Persian buttercups but the violas were lost – they had done really well since I planted them last spring but with the heat, did not like being out of the earth that long.

Clearing up and making right was realively easy – the fence was checked and any loose nails hammered back into place before winter.

Our Leaf is used to take the stumps to the dump – each wrapped in a black bin liner.

So you have ground zero, now what?

I met a motorcyclist yesterday and talked over my wish to have a deciduous hedge with cottage gardening (i.e. my salvaged bulbs) on the lower levels.  More of a haven for wildlife that the laurel and something that changes with the seasons.

I’m putting in the order for the 10 beech trees early next month so everything is ready for spring.

There are some wonderful webpages on hedge management and using a hedge for the production of firewood, I particular enjoy reading Christoper Long’s site.

Possibly not this site but the long hedge round the back garden could be put to good use…

 

 

 

The 28 day problem

The past five weeks have had some interesting learning code wise 🙂

Normally, smime messages are signed with the public key signature embedded in the message.  It allows quick and simple verification of who has sent the message and whether that signature is valid against a root certificate.  The root certificate is typically held in a certificate store, an encoded file indexed by certain attributes of the certificate.

This practice is commonly found throughout the internet.  In fact the code I inherited on the 1st April which was tested and working, was doing exactly that same, cut and pasted, formula.  The author may have been the one who initially posted – that has been lost in time.  A reasonably clear example is given here: Explore a bouncy castle store object.

If the certificates are not held in a file based certstore and the public keys are not held in the sent message, these techniques fail.  The case I am displaying here is against an Active Directory certificate service.

Instead, you end up with this: extract the signature from the message into a SignatureInformationStore, for each signature get the information regarding the certificate used, use that to query the active directory certificate store and then verify the signature against that relevant certificate.  The certificates may be proven against the associated root certificates and any certificate revocation lists.

LDAPCertStore certStore = new LDAPCertStore (new LDAPCertStoreParameters (host, port));

SignerInformationStore signers = smimeSignedMessage.getSignerInfos();
Collection c = signers.getSigners();
Iterator it = c.iterator();
//in our case there is only one signature

SignerInformation signer = (SignerInformation)it.next();
X509CertSelector xcs = new LDAPCertSelector();
xcs.setIssuer (signer.getIssuerDn());
xcs.setSerialNumber (signer.getSerialNumber);

Collection <X509Certificates> certCollection = certStore.engineGetCertificates (xcs);
//as there is only one cert!
Iterator thisCert = certCollection.iterator();
boolean verified = (signer.verify(new JcaSimpleSignerInfoVerifierBuilder().setProvider(“BC”).build(thisCert.next())));

At this point you can then verify the certificates using standard methods.

The big thing here is the use of the X509CertSelector.  You cannot use signer.getSID() as the LDAPCertStore is not an extension of CertStore which has the ability to select the certificate based on the getSID values from the signature.

Instead you need to understand what is available from the signature that you can use to select the unique certificate.

Here endeth the lesson.

Actually… This does not have any error handling and you are going to need that for the cases where it doesn’t work.

Coming of age

One of the things you forget as you get older is when certain things not only kick in (legal sex. cigarette smoking and drinking) but also that you not only have the means to prove your identity easily (credit cards are always my fav. as legally you cannot have a credit card in your name under the age of 18 although it establishes nothing else about you).

On Friday I got a letter from HMRC asking if my son’s name was what we registered it as at birth ready for his national insurance card (for the non-UK residents, that’s his social security number).

At 16, he can legally work and receive recompense for it which will be subject to tax and national insurance.

Of course, noone in the family is carrying this document as we head to the local cinema to see Suicide Squad (pretty romp), BBFC 15.

Which means when an over officious usher asks to see my son’s proof of id to say he is over 15, we don’t have anything on us.

Apparently, we can have a refund of his adult charged cinema ticket, but because he is not carrying id he cannot go into the film.

They would accept a photo of an out of date passport so long as it did still look like him: does not that make you feel that this cinema is holding up there end of the bargain and trust afforded them?

After all, cinema ticket costs £9.40, a passport costs £46.

At least the rich 15 year olds can go and see an over 15 film!

It’s been a while

Life with the Leaf becomes the norm pretty quickly and you do just take it for granted.  Since we bought the Leaf in Jan 2014, I cannot imagine using an internal combustion engine for my daily commute.  In fact, my beautiful motorbike is failing to rack up miles as a result.

A rhythm is established on when you charge, when you take it easy and when you enjoy the smoothness and the power available just as in any other car with an electric motor.

You get used to having the information at your fingertips about how you are driving and how you are making the most of the cheap fuel powering your car.   You get very used to not having the judder and delay from an internal combustion engine.

You get used to the economy, which is predictably yours.

Sounds ideal…?

To the most part it is.  If I don’t want the hassle of taking a risk in my normal weekly commute, I charge the car when I get home during the summer.  The beauty of this is the sun is providing the electrons being stored in the battery.  It makes the most of what we’re not using.

Over the summer, I have been reliably achieving 4.50 miles/kWh this month (in fact, more than 4miles/kWh since March).  This is pretty impressive compared to the winter and makes my journey to work (and back of course), at a price of 12.21p per kWh, means I have a journey of 15miles (to the nearest whole mile), costing 40p to the nearest whole penny.

The costs for 2016 so far are £68.83 to cover 2,293 miles.  Which is 33p a mile.

The cost, if I buy the electricity from my energy provider rather than use what is being generated by the PV cells, per week of travelling the 74 miles (not rounded) is £2.01 (to the nearest penny).

The journeys I have made to London for work, cost a little more than that, although you could argue that I do charge the car overnight at 12.12p per unit to the tune of 20 kWh or £2.42 at least once.

We’ve been through this before!

We have.  Things, they are a changing.  On the 1st July (I know that is twenty days ago, I have been a little busy with one thing and another), Ecotricity is changing how their Electric Highway works as per https://www.ecotricity.co.uk/for-the-road.

Instead of being free, the price for a 30 minute charge is going to be £6 :o.

Unless you are an Ecotricity customer.  In which case it will be free.

Where’s that web page again?