I forged a necklace

Made this necklace for my better half. It was the first thing I forged on my bbq-forge and it came out not too bad. I had to dress my hammer after as I was leaving too many cuts in the metal (though that has a lot to do with my inexperience!), which worked a treat! Kind of wish I had done that before trying to forge the necklace, but oh well.

Did you like this? Share it:

Filter an array of objects

Quite often I might have an array of objects, be it from a db query or some json object, and I want to filter that list in a particular way.  Lots of times I would find myself doing the same old thing; creating a new array, looping and looping until all I had left was what matched my filter.

I’m sure you’ve been there and done it a thousand times, too.

Well, this little function should help that task out a lot!

Say I had an array of people objects and wanted only those people who’s name was Bob and was aged 35, I could do something as simple as:

$filtered = ofilter($items, ['name' => 'Bob', 'age' => 35]);

Or maybe something a little tricker; I wanted to get anyone whose age was between 18 and 35 (inclusive):

$filtered = ofilter($items, ['age' => function($age) { return ($age >= 18 && $age < = 35); }]);

Pretty easy, eh?

Here’s the code – it’s a GitHub gist, so feel free to fork and improve!
Continue reading “Filter an array of objects”

Did you like this? Share it:

First “proper” thing made with a hammer and anvil

On this past weekend the family and I went camping with a few friends, and a lovely time was had by all (despite a couple bee stings and a bad face-plant by someone into a pavement). While taking down the tent we realised that our tent peg puller was a little weak and we even struggled with it to pull a couple of the tougher pegs.

This seemed like an opportunity for improvement and an excuse to make something in the forge!

Continue reading “First “proper” thing made with a hammer and anvil”

Did you like this? Share it:

First blacksmithing session

I had my first blacksmithing session last week, and it was probably the most fun I’ve had with a hammer and metal in… well, I’m too old now to remember how long ago things were. But a long time, let me tell you.

At first I learned how to draw down to a square point, and then built on that to make a rounded point. After I did those, I created a square-pointed scroll and then fish-tailed scroll.

OK, so artistically I’m never really going to do wonders (I’ll be the first to admit I’m not exactly talented in the artistic department!) But I could really get to like doing the occasional bit of smithing and can’t wait to get my anvil and forge set up and buy some hammers and metal stock to practise.

Did you like this? Share it:

Cleaning up my vice

Along with the anvil I was also given a leg vice. This is a heavy-duty vice with a long pole that goes down into the ground a little way to transfer energy away from the hammer blows or moving the metal making it less likely that the vice will break under use. It was thrown in with the anvil because, well, the guy who sold the equipment to my wife is a super nice guy but also because he could never use it… the thing was rusted all the Hell! Seriously; the pivot arm wouldn’t pivot, the screw arm was locked in place and wouldn’t move, it had a big helping of rust all over… well, I didn’t think I’d even be able to get this:

Continue reading “Cleaning up my vice”

Did you like this? Share it:

Cleaning up my anvil

The anvil I was given for my birthday is wonderful, but was really rusty. Not knowing the best way to clean it up I hit a very popular smithing forum called I Forge Iron. The people on there were nothing but friendly and helpful and gave really good advice about my ol’ girl and how to clean her up.

All it took was an angle grinder and a twisted wire cup. Unfortunately when doing this was the exact time my 4″ grinder decided it no longer wanted to live in this world and span its last disc. Thankfully I also got a 9″ grinder for my birthday (thanks, dad!) and so set about cleaning up the anvil.

I think you’ll see that the results speak for themselves…

Continue reading “Cleaning up my anvil”

Did you like this? Share it:

And now for something completely different… blacksmithing!

For quite some time now I’ve loved the idea of blacksmithing. There just seems to be something about heating up metal over a hot forge, the ring of the anvil, that harks back to times gone by. I’ve always joked with my wife that if I didn’t do web development I’d do blacksmithing. Two problems with that, though; I’m not artistic at all and felt that was a real stopper for me, thinking that you really needed to be an artist to be a blacksmith. And I was always put off by cost; anvils, forges, metal, hammers, grinders… oh my, that all seems expensive! (There’s the third problem as well of me being set in my ways, not really putting myself out there and doing things outside of my comfort zone, but we just don’t talk about that, ‘k?)

However, I have an amazing wife and a wonderful family. And for my birthday earlier this month my wife and kids managed to get me one hell of an anvil (it must weight well over 300lbs!) and a leg vice. They came from a family friend who I found out used to be a farrier and was looking to sell his (not used for a very long time) equipment. The rest of my family got me some hours tutorial at a local workshop that has a couple forges and teaches the basics of the craft (amongst many other things).

So what excuse was there left for me? None! All I need do is clean up the anvil, fix the leg vice, build a forge, take some lessons, buy some material, and practise, practise, practise. Oh my, that actually seems like a lot. But you know what? It’s time for me to break out and do something else, push myself a bit in a different direction. I really can’t wait!

Did you like this? Share it:

Rotary volume control for the Raspberry Pi

If you have checked out my previous post, you know I want to create a clock radio powered by the Raspberry Pi with the audio coming out of a JustBoom AMP Zero pHAT.  One of the things that I thought would be quite handy (probably necessary) would be volume control.  Ideally that would be some kind of hardware rotation controller, but looking around online on how one might control the JustBoom amp with a rotary encoder really only brought back results regarding full OS solutions such as Moode Audio.

As it turns out, controlling the volume for the JustBoom when using just Raspbian is actually pretty simple.
Continue reading “Rotary volume control for the Raspberry Pi”

Did you like this? Share it:

PiZero Clock Radio – Part 1

Long story short; I have a clock radio and it can just about play something from the radio and wake me up in the morning. But if the power goes out it never remembers the time or what any of the radio stations were, and it completely lacks the ability to auto-seek for stations (and I can never remember what the stations numbers are either which is why only one is ever reprogrammed in). As a result, I’ve had it in the back of my mind to build a replacement using my Pi Zero and now that I have a couple extra bits of hardware I thought I’d make a stab at starting the build.

So this is part one of the build process. Or, as I like to title it; Part “I’ve just got some neat hardware so let’s muck about and see if I can get it to do anything”.

Continue reading “PiZero Clock Radio – Part 1”

Did you like this? Share it: