Building a PHP development server from scratch

php-logoThe other day my dev server completely died, this was rather inconvenient to say the least. 24 hrs later and my new (excellent, very quiet, powerful but only consuming 150w) HP 54L Proliant Microserver was sitting on my desk ready for building.

I’ve done a server build so often that I can do it with my eyes closed , but usually miss something, so as I was in a hurry I referred to my previous post of the same name. As I did so the fact that it’s 7 years out of date became apparent. Compiling from source? Nah. Where’s Git? Not using sudo?

So, here I am re-writing from scratch for 2013…

Following these instructions will get you a Debian based PHP/MySQL development server set-up with the ability to have multiple developer sandboxes that are accessible from a remote machine on the local network, using Samba.

Time needed < 1hr

Continue reading

Enable OneNote 2013 logging

Untitled-1I’m trying to develop an MS Onenote add-on. This hard because I’m a web developer with LAMP skills so the world of C#, Visual Studio 2012, COM, Registries, DLLs and installers is all new to me. To make things worse it  seems that Onenote doesn’t qualify for a VSTO and its file format is still closed and binary where all the other office file formats are open and easy to parse.

Anyway, my addin wouldn’t load. So I thought I’d try and enable logging after seeing this post.

I eventually did get it working, of sorts using the following:

Windows Registry Editor Version 5.00

Save out as a .reg and then click on it.

If you don’t see OneNote15.log, rebooting should sort it.

Unfortunately this wasn’t much help to me as the majority of these items are logging user interaction within ON or between ON and SkyDrive. The two ObjectModel ones didn’t seem to do anything…

Note that I’ve set a lot of them to 00000000, this disables them again. Play with them to get best results. You probably want to create a second file with these in to disable logging again:


Something else useful came out of this exercise and that was finding a windows equivalent to tail -f.

Fire up Powershell and run the following command on any updating text file, it’ll now update in real time.

Get-Content .OneNote15.log -wait

Tree planting (practice run)

Getting a brew on

Getting a brew on

After our grand tour these past five years, 2013 is family Beale's year of settling, observing and preparing.  We do have a long list of jobs but we can't get them all done at once and we know that we need to plan ahead and prioritise rather than get stressed out about a mountain of work. I've also been working away a lot (not for much longer though, woohoo) and this has meant little time to get to the woods and get work done there too, much to my disgust.

Does not look like 600 trees

Come January and the whole 2012/2013 coppicing season being missed I was pretty urgent to have moved the woodland project along a bit so I ordered 600 willows as a practice plot for the wet not-much-useful-for-anything-else land that makes up the majority of our holding. The idea being that if they take ok then over the next 5 or so years we'll plant up a large part of the land as a firewood coppice.

The trees sticks came quicker than expected and were then sat for a week in a large trug filled with water to promote root growth. I had 5 varieties. The plan being a large practice firewood – sorry 'Biomass' – coppice and the final 100 as a small trial basket weaving bed, the latter being planted much closer together to keep them skinnier.

Don't do this, it's bloody stupid.

Don't do this, it's bloody stupid.

Our – mine and a mate, Mel – first attempt was snowed off, we just got one fence post in the ground. Attempt 2 a week later got all 500 of the firewood sticks in, as well as 2 further days to get the surrounding fence sorted (this would have been a single day's work for 2 people, instead it was one day each between Mel and myself). The fence proved to be essential as we didn't use guards (too expensive) we figured on a single boundary to stop the rabbits.

Mel's awesome fence

Mel's awesome fence

We left the sticks for a few days whilst we got on with other things, like earning money, and on next visit just 3 days later there were already signs of rabbit damage!

The final half day was with the entire family and we planted 100 odd sticks in a morning whilst lunch was in the slow cooker at home (genius wife) using cardboard as a mulch.

It was a more expensive exercise than I'd expected:

  • 600 trees @ £450 though at the end of year one we'll cut them all back (to promote multi stem growth) which should give us 3000+ more trees if we want them
  • Fencing material at £100. This was very low budget: VERY cheap & will immediately rust chicken wire, and all the fence posts were home felled & pointed. We definitely need some serious investment if we're going to plant up 18 acres. This test plot was only 30 m2
  • 6 days labour spread between 2 people with a guest star appearance from the Beale clan at the end. This would be a lot quicker next time and the fencing is definitely the biggest job.

We ended up with the following species mix

Isn't daddy good with straight lines?

Isn't daddy good with straight lines?

for the basket weaving bed:

  • Harrisons x22
  • Flanders Red x21
  • Triandra x44
  • Q83 x18
  • Viminalis x15

and the much larger firewood bed:

  • Viminalis 10 rows of 27
  • White Tip 4 rows of 27
  • Q89 4 rows of 27

Let's hope the rabbits don't get them all!

Grow baby, grow

Grow baby, grow

Getting the basket bed ready

Getting the basket bed ready

Quick access to Windows start-up folder

Powershell logo

Powershell, much less sucky

Want to find your Windows start-up folder to add a new shortcut?

Win+E then clicking through Computer -> C: -> Users -> AppData -> iforgetwhereitisthesedays

too much of a drag?

Try: Win+R then type shell:startup

I found a huge list here, most are a bit pointless but cialis online I can see a use for shell:SendTo also.

Don't use for launching apps, though. In that case it's all about ALT+SPACE and Launchy.

Keeping your Dropbox secured

I was building a shared work laptop the other day, something that would be primarily used by me on building sites for system commissioning. As part of the install I had automatically installed Dropbox along with other useful utilities and then suddenly had the thought. “I won't be the only person using the laptop. All my stuff is on here in Dropbox. Also, what happens if the laptop gets nicked onsite?”

I needed some way to encrypt my Dropbox folder so only when it was me using the machine the contents were available.

A quick google gave me this excellent article from Lifehacker. There's not much to add to it really, it's all there.

I now have a TrueCrypt 'volume' that I've set as a favorite, which can then be auto mounted on start-up. This volume now contains my Dropbox folder.

The nice touch is the batch script that sits waiting for the volume to be decrypted (me typing my password for it when it attempts to automount on logon) before Dropbox is started up. This need changing

slightly for Windows 8:

@echo off
rem Every second, check to see if volume is mounted
echo Waiting for volume...
ping -n 1 -w 1000 > null
if not exist E: goto keepwaiting
echo Volume found, starting Dropbox...
start "Dropbox" "C:Users[yourusername]AppDataRoamingDropboxbinDropbox.exe"