Thursday, 8 January 2015

Docker: Delete "dangling" images

After using docker for a while one notices a distinct slow down in performance of your host.

Some digging revealed that "dangling" images are the culprit.

While being a little simplistic, these are images that are no longer associated with any running container.

I dare you to go onto your docker host (even boot2docker) and do this:

docker images -q --filter "dangling=true"

My guess is that you'll see hundreds (or thousands if you've been busy) of those.

Here's the trick to getting rid of those large incontinent beasts that are leaving great piles of steaming images in your host:

docker images -q --filter "dangling=true" | xargs docker rmi

You may see a few false positives, but "hey!" at least the trash has been taken out.

Might be worth cronning it...

YMMV.

Get next free port on Linux with Ruby

Get next free port:

require 'socket'
(1..10).each do |n|
socket = Socket.new(:INET, :STREAM, 0)
socket.bind(Addrinfo.tcp("127.0.0.1", 0))
port = socket.local_address.ip_port
puts "port -> #{port}"
socket.close
end

command line:

port=$(ruby -e "require 'socket'; \
s = Socket.new(:INET, :STREAM, 0); \
s.bind(Addrinfo.tcp('127.0.0.1', 0)); \
port = s.local_address.ip_port; \
s.close; \
p port")

Sunday, 28 December 2014

A very Diggy Diggy Minecraft and Gaming Christmas!

Well.
Not just MineCraft.
Here's some photos:

Our decorations include Minecraft items!


And Daleks and K9 and some paper figures of us:

Ben got a metal Millenium Falcon to make. Warning: You will need snippers, a tweezer and the eyesight of an eagle.


He got me a Minecraft GiftPack of books.
Aimed at kids, but really cool.
I particularly liked that on page 2 of every book is a page about staying safe online.
Sigh. Vanilla Minecraft. Awesome.


Also some Minecraft paper figurines.
(The video is Wil Wheaton and others playing Ticket to Ride)


I got him a baby StrandBeest!
It really works and walks and creeps you out with its organic look when it's moving.


And would you believe it, we bought each other a copy of the KJV Manga Bible!
See Moses using his Ninja Skills!
Curiously the one on the left covers the whole old testament in great detail while the one on the right skips most of it to concentrate on the new testament.
Both leave out a shed load of books from both testaments, but they are both very cool.


Oh. And here's Ticket to Ride!
We played it straight away and love it.


Monday, 8 December 2014

"Minecraft Colada" Parody of Escape (The PiƱa Colada Song)"

I was gaming with my lady, been on our console too long.
Replaying all those old missions, felt just like donkey kong
So while she installed some patches, I browsed a forum instead
And in a thread about questing, there was this post that I read...

[chorus]
If you like mining for diamonds and hunting sheep in the rain
If you'll forge your own armour and you'll eat zombie brains
If you kill endermen at midnight... and you wear a cool cape
I've the game that you've looked for... play minecraft and escape

I didn't show it my lady, I know that sounds kind of mean...
But she seemed happy with the console, I didn't want to break up her routine
And so i logged into the forum, and hit reply on the post.
I wanted to try this new game, was even willing to host.

[chorus]
Yes I like mining or diamonds, and hunting sheep in the rain
Zombies, skelons, and spiders... all of these will be slain
I've got to log in by tomorrow night, for a gaming escape
We'll use a mod pack from yogscast, while it's still up to date.

And so I spawned on the server, and started punching a tree
I saw my new gaming partner... as she killed squids in the sea
It was my own gaming lady and she said, "Aw, it's you."
Then as she put down a workbench, she said "I never knew."

[chorus]
That you like mining for diamonds and hunting sheep in the rain
And the crafting of armour, and the farming of grains.
if you kill endermen at midnight... and you wear a cool cape
Your the player I've looked for... play with me and escape

[chorus]
If you like mining for diamonds and hunting sheep in the rain
If you'll forge your own armour and you'll eat zombie brains
if you kill endermen at midnight... and you wear a cool cape
I've the game that you've looked for... play minecraft and escape

[chorus]
Yes I like mining or diamonds, and hunting sheep in the rain
Zombies, skelons, and spiders... all of these will be slain
I've got to log in by tomorrow night, for a gaming escape

...

Tuesday, 21 October 2014

Minecraft Yogscast Complete Pack - How to make BRONZE!

Annoying as buggery.
Want to play with BEES!
But you need bronze.
And wouldn't you know it if you pop 3 copper ingots around a tin ingot in a crafting bench as described in the wiki it does nothing.
Nada.
Nil.
Zip.
I thought it might be that the ingots were Mekanism, but I tried others.

So here's the trick.

1) Get a stack of ingots and go to your crusher.
2) Crush them to dust.
3) Go to your metallurgic infuser.
4) Pop the dust in the left hand "power" bar (purple box).
(If you have redstone or coal in it, click the 'dump' button')
5) Pop your stack of copper ingots in the input (red box).
6) Out come bronze ingots.


Thursday, 16 October 2014

MicroServices explained in a visual medium: MineCraft!

I got sick of the endless power point and slide share presentations of what MicroServices are so I created a MineCraft version:

https://www.youtube.com/playlist?list=PLN2jfHfKDn4eQ1B1O_gazraS53i77puGn


Monday, 6 October 2014

Just published my first book!

Well well well.

Many people have asked me to curate all the humorous posts I've done over the years and publish them.

So I did.

244 pages of them.

From 2005 to today. Ok I lost a few due to hardware failure, but I made up for it by adding some humorous photos and of course: Kittens!

To whet your appetite here is a sample of the contents:


  • Blackpool. Gack...
  • Superman and other heroes...
  • Marcel, Speed Cameras and Rat Throwing as a Sport
  • Greek Gods, Washed Hedgehogs and Bluetooth
  • Dead Flies and Calculations
  • 12 steps for vampires
  • Obesity is the key to the survival of man!
  • When Sticking a Screw Driver in your Face is Preferable to Going to the Dentist and More Movie Reviews
  • Cthulhu Eggs and What's really funny
  • I am not “The Internet with Boobs”
  • Monastic Speeders, Pants around Ankles and Bikes
  • Rawhead Rex, Maniac Nurses and a Steam Powered Cat Cannon
  • Is everything shit or is it just me? Oh and H.P.Lovecraft
  • Rats, an old house and worlds craziest chases
  • Deep Fried Squirrel with Garlic Mayonnaise!
  • Mansquito (TV 2005) O.M.G. Bad Sci-Fi Reaches new Lows
  • There's a dead cockroach next to my ashtray
  • Portal for Programmers - Still Have a Job
  • Mambo Number 5 for Programmers - Rebuild Number 5
  • This is an ex-iPhone...

So go to https://leanpub.com/randomactsofsentience and support your local nutter! That's me if you haven't figured it out.

I'll be starting my next book shortly.


Tuesday, 16 September 2014

Memories of my mother

1955.




1956: Where I was born:


And her first house where I grew up:



Gawd I was a big baby:


Hi Mum!


Monday, 15 September 2014

My mother died this morning

I received the message that the time of death was 7:20am.
I was just arriving at my desk at the time, and sent hurried emails to various people indicating that I would have to be involved in the final arrangements.
I was first to arrive at the 5-star aged care facility and had to “identify” my mothers body.
(That's an informal identification purely for the bureaucrats)

I have seen many deaths in my lifetime but that I was struck dumb because this was my mother.
I stroked her head and said:

"Goodbye. You had an absolute shit of a life but at least you had a few weeks of pampering to make up for it."

My siblings arrived and we went through the process of saying goodbye, signing forms etc.
We then went to my house and made funeral arrangements.
The funeral people took the necessary steps and my siblings and I evacuated her room so as not to encumber the staff at the facility.

We have now dealt with all the arrangements in a calm orderly way.
Having said that, we’re all a tad shattered by the suddenness of her death.
As such, I will be taking tomorrow off to... well basically... grieve as I have had to keep my emotions in check for the day to ensure a smooth process for all involved.
As have we all.

Tomorrow I will weep.

Somewhat humorously, her passing (and perhaps others) might have happened last week in a explosive fashion.
And I *do* mean explosive as she was caught with a cigarette in one hand and the mouthpiece for an active oxygen cylinder in the other at 1am Friday morning.
I have to say that when I go, I’d like to do it that way.

Tough bird my mother.

For more details: http://www.randomactsofsentience.com/2012/05/mothers-day-my-mother-is-one-tough-old.html from May 2012.

Goodbye Mother.
I love you.

Sunday, 14 September 2014

OMG I'm covered in BEES!

I've got more stories than... than..

Ok. I was at work and got a phone call from my other half.

"We're not alone"

My first thought was that alien life had been discovered.
But sadly no.
Bees.
A swarm of them had invaded the weep holes above the front door and were preparing to nest.
My first thought was to get a bee-keeper in.
Sadly a search proved fruitless in our area and I eventually suggested that Ben find an exterminator.

I reached a logical break point in my work and raced home.

Swarm *partially* under control.

They’re not native ones BTW.

I went out with a half full can of "Nest Control” and sprayed the buggery out of the area infected.
In the weep holes as well until the can ran out.

Neighbours must have thought I was nuts as while doing that as I was dum-de-dumming "Ride of the Valkyries” loudly and shouting at the buggers “I love the smell of insecticide in the afternoon!” all in my currently cracked voice.

Not a complete fix, but it will stop them coming into the house via the light fixtures.

Which they were doing.
Lots of them.
And attacking any light that was on.
The first time I have seen venom dripping from a light bulb.
Yes really.

I swatted about a dozen which had invaded the kitchen.
That’s how I know they’re not native bees.
Fat little European buggers and frackin’ aggressive.
Eventually I managed to scoop up dozens of little bee bodies.
Bucket'o'bees it was.
Like the Marne.
We'll be finding little mummified corpses for days.

I also covered up the light fixtures downstairs with Ice Cream container lids and blu-tack.
Obviously I couldn’t spray liquid into a light fixture!

Several exterminators were called before finding one which would agree to deal with the issue.
(Wow. The number of “Bees? You’re fucking kidding!” responses followed by “click” was a tad disturbing)
We eventually found a dude who would deal with the issue.
"George" said he would come around the next day between 8..9am.

So. It was a dark evening with the incessant buzz of BEES!

Unfortunately Ben can’t deal with the little buggers for two reasons:

1) Since he went diabetic, he’s developed a swathe of allergies and almost certainly one to bee stings and
2) Two of his sisters are strongly allergic to bee stings, which means he probably is as well.

I don’t think I’m allergic to bees and in any case I’m a head first sort of person, and I’m at a point where if ONE MORE FRACKIN' THING happens in my life, I’ll go postal.

Anyway, the dude turned up at 10am the next day.
Pretty laid back kinda guy.
Brought out the biggest frackin' vacuum cleaner I've ever seen.
Size of a 44 gallon drum.
On wheels.
He scooped up a metric-shit-ton of them and fluffed dust into the weep holes.

So...
We're free of the communist-led left-wing all-your-weep-holes-belong-to-us bee-collective for the moment.
This is our 3rd infestation.
I try to do my best and find bee-keepers.
Why? Because... Because... BEEs!
Which you would have thought would be doing a roaring trade given the number of these incidents.
But no.

Still. Another story to add to my repertoire. Sigh.