ajdurant - Andy Durant

Random notes and things

  • Printing web pages to PDF programatically

    I recently needed to dump a bunch of web pages to PDFs. There are several different possibilities for doing this, however many of them don’t print items rendered by js after the page load.

    Read more…
  • Windows Hyper-V VLAN Trunking

    I’ve been struggling for a while to get a working network in my virtual lab. My basic setup is: Hyper-V as hypervisor pfsense as router/firewall with: External network (bridge) for WAN Internal network (to Hyper-V Host) for LAN, in order to access the web configurator Private network for lab, for other VMs to connect to VLANs on the private network to separate VM networking and replicate real life networks I want to use a single network with multiple VLANs, as it replicates the real life network.

    Read more…
  • Windows Wake-on-LAN deployment

    I needed to get Wake-on-LAN (WoL) settings enabled in Windows via a script, to deploy across a fleet of PCs. There a a number of different ways to do this, and a lot of the ones I found involved WMI or VBS or registry editing.

    Read more…
  • Setting up a Raspberry Pi for a kiosk display

    A while back I put together a dashboard display screen using a Raspberry Pi, recently I was doing it again and had to dig through to work out what I had done before.

    Read more…
  • Static site generation with Hugo

    In December 2016 I started re-writing my website to be generated as a static site. I wanted to make the blog the same as the rest of the site, and move it off Tumblr, as it had been using the same theme as my original website.

    Read more…
  • Response to 'Look Wherever You Want'

    This blog post is a response to Elisabeth Shuker’s blog on the 8th of May 2014, which itself is a response to Gary Turk’s spoken word video ‘Look Up’

    I would recommend reading / watching these.

    Whilst I agree with the disarmament of Gary Turk’s video, I think it is wrong to suggest that technology is a blank canvas. I would say that whilst the majority of human creative works are neither inherently evil or good, and can be used for both purposes, the things we create are not created neutral.

    Technology can shape and change us as much as we shape and change it. And all things we create have a manifestation of our worldview within them. This is most clear in storytelling media: films, books and TV have a message behind the story, they create a world which has a moral basis and structure and as we absorb ourselves into their culture our worldview and moral basis can be shifted by them (both towards or away). This is not always the case, but I would argue that our perception of the world is created through our previous experience, which may often come from or relate to created worlds in story telling media.

    Read more…
  • Tablets and why I don't like the iPad

    Having used an iPad for the last week whilst working on URY’s Radioplayer Webview, as part of a hack-week (more on that soon I hope) I have come to the informed conclusion that I don’t like it. I’ve always been reserved over the usefulness of tablets, and mostly think of them as pointless: I can either use my laptop or my phone, both of which I normally have with me. The iPad in particular has frustrated me because it is basically a large iPhone iPod touch, which I don’t like much either. Don’t get me wrong, I don’t dislike apple. I am currently writing this on my MacBook, which I think is great, and I’m a massive fan of Logic for audio related work. However I feel the current tabletisation of OS X is making it weaker, not better.

    Read more…
  • Fun with Flexbox

    In the course of the past few days I have discovered parts of CSS that I never knew existed, but have often wished did in some form or another. Amongst these is the calc() function which lets you calculate values for properties, such as calc(100% - 3em).

    The one I’m most excited about for the moment is Flexbox or the Flexible Box Layout Model. I first discovered this from Paul Irish, on his flexbox tutorial over on html5rocks.com however as warned I soon discovered the issues with the changing spec of flexbox and the many versions implemented (or not implemented) by different browsers.

    The issue is as browsers implement moving specification and then it changes drastically so much to break everything. So now there exists the 2009 spec (display: box) which is in quite a few browsers, some mixed up 2011 stuff from a transitionary period which doesn’t exist in browsers but is scattered across the internet in various guides as ‘how to use the new flexbox’ (display: flexbox) and lastly the current implementation (at time of writing) which is implemented (at least partially) in all modern browsers.

    Read more…
  • A short time spent with multiviews

    I’ve recently been building a new website, well newish. It’s a re-design and replacement for a website written a couple of years back and made in the CMS Drupal. I also recently read (albeit rather old) an article on URIs not changing. Now this prompted various thoughts into my head, some of which I had had whist designing this other website. Such as why do I have to have .html on all my URIs? The old site most of the content was coming from didn’t (I know this is down to mod_rewrite for fancy SEO urls by Drupal, but all the same).

    So I started to try and find out what Sir Tim was on about here, something really simple you can add that makes it ‘just work’ that doesn’t sound like any web development I’ve done before… There seemed to be lots of posts from people who had also read the article and were looking for the answer, but no-one else seemed to know it, nearly everyone pointed to use some variant of mod_rewrite to various degrees of complexity. But then I found the answer, it really was quite simple, enable MultiViews in your apache config for that directory, and it would ‘just work’ you could even have it auto detect language setting from the browser.

    A quick update and build later and both the site I was working on and my main website were extensionless and wonderful. However this was not to be the end of the story.

    Read more…
  • It's Summer! (though it may not feel like it)

    So it’s now the summer holidays for me (3 months from The University of York, thanks =P), well it has been for a couple of weeks. A lot has happened this term, exams, finishing project work, finishing the year, exploring the campus, discovering URY history, hanging out with friends, going to Whitby, and all sorts of things that I can’t remember due to the busyness. It has been busy, but it’s been great fun. Even with the pressure of exams, which never bother me too much however I’m glad to say I passed the year fairly well and shall be continuing onwards on my journey of becoming an Engineer in Computing.

    With a rapidly diminishing 3 months ahead of me (it always goes quicker than you think, particularly the longer you have, I find…) I have a fair amount planned, and a fair amount ready to be filled with all kinds of randomness my friends might come up with to do.

    Read more…