Searching multiple files in PowerShell

Today I needed to check several scripts to see which ones used (the same) global field (don’t ask). I was doing this at work and Powershell proved to be surprisingly adept at doing this. All I needed was:

Get-ChildItem "Scripts_Folder" -recurse | Select-String -pattern "Field_Name" | group path | select name

… where Scripts_Folder is the folder containg the scripts and Field_Name is the field I was searching for.

Powershell returned a simple list of all of the files containing the field. I can see me needing to use this again, which is why I’m making a note of it here.

flattr this!

Ninja Goats vs Pirate Chickens

Pirate Chicken

Pirate Chicken

Inspired by a conversation on Quitter, I found myself thinking about what a game involving ninja goats and pirate chickens would actually look like. The conclusion I eventually arrived at was pretty simple: Fox and Hounds, but with the addition of a treasure chest. The ninja goat wins by stealing the pirate chickens’ treasure and the pirate chickens win by capturing the ninja goat.

I quickly typed up some rules and started having far too much fun Gimping together images from Openclipart.org to make some game pieces. Of course, the real test of any game is when you start playing it, and for this I had to wait until Saturday.

It proved to be surprisingly playable. The simplicity of the game is such that a seven-year-old is able to think through various strategies with no prompting on my part. And the addition of a treasure chest added interesting quirk in that I could see Macsen actively thinking about how to defend it with the fewest possible resources. This also mitigated, somewhat, the fact that the chickens should always win.

Ninja Goat

Ninja Goat

What really surprised me, though, was the extent to which the twins were able to get involved. The simplicity of the rules was such that they could easily understand the game and the shortness of the game meant that boredom didn’t have a chance to set in.

All in all, a surprisingly successful afternoon was enjoyed by all, a conclusion that was confirmed this morning when Macsen asked me where I’d put the game.

And finally

If you want to play around with this, here are a couple of links to the counters and instructions. If you can come up with better graphics, please do let me know.
Counters
Instructions

flattr this!

The Duffercast is like a bus… You wait for ages and then three turn up at once

I mentioned, earlier this month, that the Duffercast Christmas Special had finally been released, but that was just a start. Ten days ago Duffercast 5 – My Pyjamas Are Calling Me hit the feeds and yesterday your intrepid duffers published Duffercast 6 – I am talking absolute shite tonight.

Duffercast 5 – My Pyjamas Are Calling Me

StationFour of the duffers gathered to discuss old tech, childhoods, toys, the Cold War and some other stuff. There was music played, too, all under free culture licenses, as usual.

Duffercast 6 – I am talking absolute shite tonight

Boris Johnson We can’t count, but we know this is the August Easter special, which will be out by Christmas.

We emit sounds, discuss Scottish independence, Boris Johnson, Belgium, whiskey, and the rarity of Scottish Creative Commons music.

Download, listen and enjoy. You won’t see a frenzy of dufferdom like this until the next one.

flattr this!

IBM i Access Client Solutions… on Arch

This is a follow up to my earlier post about connecting to a cloudy AS/400 (yes, an actual AS/400 running V5R3M0).

As I mentioned at the time, I had run into problems installing iSeries Access because IBM had removed the RPMs from their site, I asked about this and the package maintainer very helpfully provided me with a collection of links to the various versions. However, he also mentioned that the source files were removed from the IBM website because they want everyone to use the IBM i Access Client Solutions. This is in the AUR as iacs, so I thought I’d try this first.

It works… beautifully.

And I do love a snappy application name.

flattr this!

Cloud/400

I never thought I would be able to use that as a post title but, as reported by The Register, German hosting company Rechenzentrum Kreuznach has popped an AS/400 into the cloud, and anyone can use it for free. I’m anyone so I signed up.

Of course, there isn’t much point in having an account if I don’t have a terminal. Fortunately, Arch has everything.

I first tried tn5250 which proved to be a nice little package that can be started from the terminal. It certainly works and achieves exactly what it attempts. The only problems I encountered were that some of the key mappings were a bit odd (probably as a result of me using the wrong character map) and (more seriously) that running one terminal inside another can cause a little command key confusion.

It was at this point that I noticed that the AUR actually includes iSeries Access. Unfortunately, this is proving to be a bit of a struggle – the package maintainer appears to have assumed that I’ve already downloaded the RPM, which I have been unable to find. I’ve left a comment on the package asking about this and will come back to it if I am able to find the RPM somewhere… anywhere.

(Tangentially: How does IBM manage to continually build such awful websites? Every time I have to negotiate Big Blue’s labyrinthine online presence, I find myself faced with sites that are slow, clunky, painful to navigate and – all too often – completely inconsistent.)

So I turned to the TN5250 Java Edition. Installing and configuring this turned out to be a completely painless process, and I’m in.

To tell the truth, I’m not sure what – if anything – I will do with this. But it’s always fun to poke around an older bit of kit, if only to remind myself how far things have progressed over the past decade.

flattr this!

Exploitation films: An observation

I watched Piranha again this evening. In this film is a scene in which our heroes find themselves racing to reach a waterside summer camp before the razor toothed horror arrives. It’s a very tense sequence and much of the tension derives from the fact that this is an exploitation film.

Had this been a mainstream film, I would have been watching safe in the knowledge that children and animals will never find themselves in real peril and, therefore, that the heroes would arrive in the nick of time. Piranha, however, is an exploitation film – produced by Roger Corman to cash in on the success of Jaws. And because it’s an exploitation film, all bets are off.

You don’t know whether or not the heroes are going to arrive in time. And it’s this that makes that particular sequence particularly nail-biting.

flattr this!