<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel>
<title>Craig Mayhew</title>
<link>https://craig.mayhew.io/</link>
<description>Essays and blog posts by Craig Mayhew.</description>
<language>en-GB</language>
<atom:link href="https://craig.mayhew.io/feed.xml" rel="self" type="application/rss+xml"/>
<lastBuildDate>Thu, 19 Mar 2020 21:17:04 GMT</lastBuildDate>
<item>
<title>Live Lab</title>
<link>https://craig.mayhew.io/articles/livelab/</link>
<guid isPermaLink="true">https://craig.mayhew.io/articles/livelab/</guid>
<pubDate>Thu, 19 Mar 2020 21:17:04 GMT</pubDate>
<description>Everyone needs a testing ground, and for me bigprimes.net is where I test deployment of new tech. Detailed below are future tests, and results of previous ones. As usual, it&#39;s open source.


    Future: World computer
    Golem currently looks like the first opportunity to try distributing a problem over a trustless and distributed cloud.


    Future: Decentralized file storage
    Sia currently looks like the best opportunity for a decentralised data backup. In future it may become…</description>
</item>
<item>
<title>Blockchain</title>
<link>https://craig.mayhew.io/articles/blockchain/</link>
<guid isPermaLink="true">https://craig.mayhew.io/articles/blockchain/</guid>
<pubDate>Thu, 01 Mar 2018 23:00:00 GMT</pubDate>
<description>Blockchain is an emerging technology, and not a magic wand. This article aims to help you understand the technology at a high level, as is required before asking questions like “Should we be using blockchain in our organisation?”. The answer is almost certainly no.


    What’s a blockchain?
    Blockchain technology has been around since 2009. It&#39;s only recently that businesses are trying to understand it.


    Blockchains are databases that are duplicated across many servers, or…</description>
</item>
<item>
<title>Serverless</title>
<link>https://craig.mayhew.io/articles/serverless/</link>
<guid isPermaLink="true">https://craig.mayhew.io/articles/serverless/</guid>
<pubDate>Wed, 01 Nov 2017 23:00:00 GMT</pubDate>
<description>Executive summary
    The next big thing that&#39;s been happening since 2011.
    Manage less infrastructure, less ops and concentrate on your product.


    Serverless means no operating systems, no patches, no orchestration and less scaling concern.


    Serverless has been available for simple websites since 2011 when Amazon announced you could host a website directly on an S3 bucket. This immediately took away the need to deal with virtual machines and operating systems. Suddenly you…</description>
</item>
<item>
<title>Hacking AWS CloudFront Pricing</title>
<link>https://craig.mayhew.io/blog/hacking-aws-cloudfront-pricing/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/hacking-aws-cloudfront-pricing/</guid>
<pubDate>Sun, 14 May 2017 17:00:00 GMT</pubDate>
<description>Cloudfront has a complex pricing structure. AWS charge you based on bandwidth used, number of requests, region serving the traffic, and the protocol used.

HTTPS requests are typically 1/3 more expensive than HTTP.

Bandwidth prices are different depending on which of 8 regions the traffic is served from. Oh, and the bandwidth pricing lowers depending on how much you use (anywhere from $0.085 per GB for…</description>
</item>
<item>
<title>DNS, the original CDN</title>
<link>https://craig.mayhew.io/blog/dns-the-original-cdn/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/dns-the-original-cdn/</guid>
<pubDate>Sun, 14 May 2017 13:00:00 GMT</pubDate>
<description>The Domain Name System has been around since the 1980s, and often doesn&#39;t get credit for how abundant and efficient it is. Most people know it as a way to translate website addresses such as craig.mayhew.io into an ip address so that your browser knows where to request a website from but what about its little known uses?

How about the author of desktop software that needs to periodically check to see if updates are available. One could write code into the software to check a URL via HTTP,…</description>
</item>
<item>
<title>Open Source craig.mayhew.io</title>
<link>https://craig.mayhew.io/blog/opens-source-craig-mayhew-io/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/opens-source-craig-mayhew-io/</guid>
<pubDate>Sun, 15 Feb 2015 22:16:00 GMT</pubDate>
<description>Open source has been the mainstream paradigm for some time now. Although I am a little late to the party with some of my code, I am continuing to open source as much as possible, as quickly as possible. This website is now entirely open source and can be found on github: https://github.com/craigmayhew/craig.mayhew.io.I&#39;ve moved away from using mongodb and instead store the blogposts and pages in simple json files (one file per page/post). It&#39;s currently at about 230MBs including photos and…</description>
</item>
<item>
<title>Raspberry Pi Automated USB Eraser</title>
<link>https://craig.mayhew.io/blog/usb-secure-eraser/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/usb-secure-eraser/</guid>
<pubDate>Thu, 31 Jul 2014 21:45:01 GMT</pubDate>
<description>Ever needed to securely wipe a USB drive with minimum effort? How about doing it every day? This project hoped to simplify the process. All you need to do is plug in a usb drive and the process starts automatically. A small, low power and low cost box that easily, securely and quickly erases USB drives for re-use.All you need is a Raspberry Pi model A, a nice case, an LED, resistor and some wires.Wire the LED into pin 7, wire the resistor to the other LED pin, wire the resistor to a ground…</description>
</item>
<item>
<title>My Reprap Mendel</title>
<link>https://craig.mayhew.io/blog/reprap-4-year-project/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/reprap-4-year-project/</guid>
<pubDate>Wed, 09 Apr 2014 06:00:00 GMT</pubDate>
<description>In 2010 when Beth and I started building the reprap, we anticipated it would take us a month or two. We were wrong. We had almost no tools, no work space and limited engineering knowledge. Sometimes because work was just too busy, we wouldn&#39;t touch the reprap for months at a time. The frame was completed by mid 2010. The x axis and x carriage were completed by the end of 2010 and by 2013 the reprap was working aside from some incredibly poor printing accuracy. It wasn&#39;t until this weekend just…</description>
</item>
<item>
<title>Economics of SETI on AWS spot instance</title>
<link>https://craig.mayhew.io/blog/economics-of-seti-on-aws-spot-instance/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/economics-of-seti-on-aws-spot-instance/</guid>
<pubDate>Mon, 25 Nov 2013 07:00:00 GMT</pubDate>
<description>I needed an excuse to use spot instances on AWS to test them for some upcoming projects. I chose SETI and I have to say it was a nice simple experience. It took about 30 minutes to build the linux VM, set it up with SETI and turn it into an AMI. This instance was one of the new c3.large high CPU instances. These were the financial results:

$0.45 / 14 Hrs = $0.032 per instance hour
2 Cores per instance so $0.032 / 2 = $0.016 for one core hour
SETI creates 100 points every ~12000 seconds ish…</description>
</item>
<item>
<title>NX Server on CentOS 6</title>
<link>https://craig.mayhew.io/blog/nonx-machine-centos6/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/nonx-machine-centos6/</guid>
<pubDate>Sun, 10 Nov 2013 12:11:45 GMT</pubDate>
<description>Install nxserver

yum install nx freenx 
cd /etc/nxserver
cp node.conf.sample node.conf 
vi node.conf 
Ensure that this line is not commented out:
ENABLE_PASSDB_AUTHENTICATION=&quot;1&quot; 

Set up NX Server

vi /etc/ssh/sshd_config

nxserver --adduser craig
nxserver --passwd craig

touch /var/lib/nxserver/home/.ssh/known_hosts
cd /var/lib/nxserver/home/.ssh/
chown nx:root known_hosts

vi /etc/nxserver/node.conf

Install NX client

Depends on your operating system, in my case it…</description>
</item>
<item>
<title>Scrypt Hash</title>
<link>https://craig.mayhew.io/blog/script-hash/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/script-hash/</guid>
<pubDate>Tue, 20 Aug 2013 07:00:00 GMT</pubDate>
<description>Developers have a responsibility to protect their users as much and as often as they can. I would like to live in a world where everyone leaves school with the know-how to protect their passwords with something such as lastpass for each site they use. However we aren&#39;t quite there yet.Let&#39;s look at the various levels of hashing and security you can put in place to protect your users.Level 0: Passwords are stored in plain text on the server file system or in a database. This is just terrible and…</description>
</item>
<item>
<title>New blog - using tiny php framework and mongodb</title>
<link>https://craig.mayhew.io/blog/nem-blog-using-mongodb/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/nem-blog-using-mongodb/</guid>
<pubDate>Sat, 10 Aug 2013 17:00:00 GMT</pubDate>
<description>I have replaced my ancient wordpress blog with a lean custom php framework. The blog entries, tags, categories and comments are now stored in mongodb rather than mysql. This has speed advantages in the case of a high read / low write blog as all the data for a page load is stored as a single database &quot;document&quot;.

This is in contrast to the relational way of storing the data that needs at least 3 JOINS to retrieve the same information. Page load times dropped from ~2 seconds to 40 milliseconds…</description>
</item>
<item>
<title>Upgrading turnkey redmine from 1.3.0.stable.8673 to 2.0.4.stable</title>
<link>https://craig.mayhew.io/blog/upgrading-turnkey-redmine-from-1-3-0-stable-8673-to-2-0-4-stable/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/upgrading-turnkey-redmine-from-1-3-0-stable-8673-to-2-0-4-stable/</guid>
<pubDate>Sat, 18 May 2013 07:00:51 GMT</pubDate>
<description>First, upgrade rails. This will take some time, go and make a tea/coffee.
#gem install rails

#cd /var/www
#mv railsapp railsapp-old
#hg clone --updaterev 2.0-stable https://bitbucket.org/redmine/redmine-all railsapp
#cp railsapp-old/config/email.yml railsapp/config/configuration.yml
#cp railsapp-old/config/database.yml railsapp/config/database.yml
#cp -r railsapp-old/files/ railsapp/files/
#chown -R root:www-data /var/www/railsapp
#cd railsapp
#gem install bundler
#gem install…</description>
</item>
<item>
<title>RaspberryPi Power Management with a TellStick</title>
<link>https://craig.mayhew.io/blog/raspberrypi-power-management-with-a-tellstick/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/raspberrypi-power-management-with-a-tellstick/</guid>
<pubDate>Mon, 15 Apr 2013 17:22:09 GMT</pubDate>
<description>#sudo apt-get install libftdi1 libftdi-dev libconfuse0 libconfuse-dev cmake

Download the latest source code from Telldus at:  http://download.telldus.se/TellStick/Software/telldus-core/ you can use the wget command for this.

In these next commands, change {version} to the downloaded version.
#cd /usr/src
#gunzip telldus-core-{version}.tar.gz
#tar xvf telldus-core-{version}.tar
#mv telldus-core-{version} telldus-core

#cd telldus-core
#sudo cmake .
#sudo make
#sudo make…</description>
</item>
<item>
<title>ZFS vs 7Zip for virtual disk backups</title>
<link>https://craig.mayhew.io/blog/9/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/9/</guid>
<pubDate>Tue, 19 Mar 2013 16:16:13 GMT</pubDate>
<description>This details a real world example of the benefits of ZFS dedupe.My backup disk contains 2.4TB of 7z files. Each file is a website backup, a database backup or a 7z backup of an entire virtual machine / server. Many of these backups are of the same thing but at different points in time. For instance, my Windows 7 Virtual machine is backed up 7 times for a total of 961GB after 7zip compression.Looking at my latest Windows 7 backup of Virtual Disks (My virtual C drive and data drive):
238GB…</description>
</item>
<item>
<title>When did I get old?</title>
<link>https://craig.mayhew.io/blog/how-am-i-25-and-old/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/how-am-i-25-and-old/</guid>
<pubDate>Sun, 17 Mar 2013 09:00:30 GMT</pubDate>
<description>Sitting down for our regular Sunday breakfast at Pitcher &amp; Piano on the marina. I&#39;m perusing the FT feeling more and more negative about the economy, but hopeful that interest rates will stay low so my mortgage gets paid quicker. Meanwhile Beth is flicking through the Sunday Times feeling slightly frustrated that she can&#39;t find a pen to do the puzzles section. Because we both end up so busy, Beth with medical school and a few side projects she&#39;s working on, me with work and a healthy dose of…</description>
</item>
<item>
<title>Future of The Super Capacitor</title>
<link>https://craig.mayhew.io/blog/future-of-the-super-capacitor/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/future-of-the-super-capacitor/</guid>
<pubDate>Tue, 12 Mar 2013 07:00:45 GMT</pubDate>
<description>Super Capacitors have been closing the gap with batteries over the last decade. Maxwell Institute currently dominates the Wikipedia article for super capacitors and has devices that store enough power to be a phone battery replacement. The problem is, the capacitors currently require 10x the volume.

With capacitors continuously improving, this got me thinking. What is the maximum power density that physics allows for super capacitors and what would this mean if we achieved it... Would…</description>
</item>
<item>
<title>ZFS on FreeBSD</title>
<link>https://craig.mayhew.io/blog/zfs-on-freebsd/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/zfs-on-freebsd/</guid>
<pubDate>Sun, 10 Mar 2013 19:14:44 GMT</pubDate>
<description>For this test I will be running FreeBSD in a VirtualBox virtual machine. These instructions will work regardless of this.Download the 64bit iso of FreeBSD. I am using version 9.1.Install FreeBSD from the livecd. I decided to drop the games from the install.I initially tried to get a bootable zfs partition going, but after several hours of failed attempts using this guide: https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE, I decided I would leave plenty of drive space spare when…</description>
</item>
<item>
<title>Switching from Vmware to Virtual Box</title>
<link>https://craig.mayhew.io/blog/switching-from-vmware-to-virtual-box/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/switching-from-vmware-to-virtual-box/</guid>
<pubDate>Sat, 16 Feb 2013 18:28:14 GMT</pubDate>
<description>So I accidentally let one of my SSDs completely run out of space. My VM running on this disk then promptly crashed. I knew I had to repair it - but while I&#39;m at it - I&#39;m going to convert it to Oracle&#39;s virtual box.

Fixing corruption

First problem is that my virtual disk is corrupted - this happens when you run out of space because the disk suddenly can&#39;t write the data it was expecting to write to disk. Ideally you will have a backup - but if you don&#39;t then make one now and then try to…</description>
</item>
<item>
<title>RaspberryPi Power Management with a PIR Sensor</title>
<link>https://craig.mayhew.io/blog/raspberrypi-power-management-with-a-pir-sensor/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/raspberrypi-power-management-with-a-pir-sensor/</guid>
<pubDate>Sat, 02 Feb 2013 17:04:59 GMT</pubDate>
<description>This is a simple guide to setting up a PIR sensor with a raspberryPI to send a wake-on-lan packet to one or more computers. The idea being that as I walk into my office, everything boots up or comes out of hibernation automatically.

SSH into the pi and get the latest python dev code:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-dev
sudo apt-get install python-rpi.gpio

Install the Wake On Lan command:

sudo apt-get install wakeonlan

Plug in your PIR…</description>
</item>
<item>
<title>My Workstation Software</title>
<link>https://craig.mayhew.io/blog/my-workstation-software-2/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/my-workstation-software-2/</guid>
<pubDate>Mon, 26 Nov 2012 09:36:42 GMT</pubDate>
<description>I&#39;m now running:

Virtualized Windows 7 64bit
I now work from a virtual machine. It is one of many workstations and servers now running on a single chunk of hardware. All main drives are 256GB ssds (VMs are selectively spread across these), 3TB spinning drive for backups, 32GBs of RAM, quad core i7-3820 CPU and a cheap / efficient GeForce GTX550 Ti. Not currently using any RAID, just regular backups (Really should RAID my backup drive).

7-Zip
This creates very very compressed 7z archives…</description>
</item>
<item>
<title>Earth&#39;s processing capacity in my lap</title>
<link>https://craig.mayhew.io/blog/the-worlds-processing-capacity/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/the-worlds-processing-capacity/</guid>
<pubDate>Mon, 05 Nov 2012 21:34:06 GMT</pubDate>
<description>I wondered how long one needs to wait before owning the current world&#39;s computer processing power for under $1000.

A few studies have been done to measure the world&#39;s processing power. In 2007 the entire world&#39;s computer capacity measured at 6.4 x 1018 instructions per second[1] as estimated by Martin Hilbert, et al. Unfortunately that&#39;s not really a useful measure of processing power. FLOP/s would have been more useful as it relates to the useful work you can do.

So I&#39;m going to have to…</description>
</item>
<item>
<title>Tweets Backup Script</title>
<link>https://craig.mayhew.io/blog/tweets-backup-script/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/tweets-backup-script/</guid>
<pubDate>Sun, 02 Sep 2012 21:33:04 GMT</pubDate>
<description>So I wanted to back up and archive my tweets. I threw together this quick and dirty script to retrieve the last 200 tweets of a twitter user (In this case, me).

Latest source code available here:  https://github.com/craigmayhew/scratchpad/blob/master/php/retrieveTweets.php

My archived tweets: craig.mayhew.io/tweets/

&amp;lt;?php

define(&#39;DB_NAME&#39;, &#39;dbname&#39;);    // The name of the database
define(&#39;DB_USER&#39;, &#39;dbuser&#39;);     // Your MySQL username
define(&#39;DB_PASSWORD&#39;,…</description>
</item>
<item>
<title>How I complied with the EU Cookie Law</title>
<link>https://craig.mayhew.io/blog/how-i-complied-with-the-eu-cookie-law/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/how-i-complied-with-the-eu-cookie-law/</guid>
<pubDate>Mon, 28 May 2012 08:00:14 GMT</pubDate>
<description>I am a keen believer in law. It stops me being killed for my wallet while walking to the shop, keeps my house from being broken into while walking to said shop and my family safe.

So when a new law is passed - I do my best to comply. This one however, is ridiculous.

The EU Cookie law.

A law passed by the European Union as a European directive. A directive to protect online users from cookies. The same cookies that make the web as we know it actually work.

So to get my site to adhere…</description>
</item>
<item>
<title>UK Spaceport</title>
<link>https://craig.mayhew.io/blog/uk-spaceport/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/uk-spaceport/</guid>
<pubDate>Sat, 19 May 2012 09:51:13 GMT</pubDate>
<description>The BBC caught my eye with a recent article on the possibility of a UK spaceport. http://www.bbc.co.uk/news/technology-18114439. This is a nice idea but I doubt we have any near term use for it.

What we really need is a government effort to develop the world&#39;s first space elevator. The first country to do this will have a monopoly over the space industry as it should reduce the cost of sending objects into space by 95%. Not to mention all the patents and intellectual property that could be…</description>
</item>
<item>
<title>Browser Compatibility Testing in IE</title>
<link>https://craig.mayhew.io/blog/browser-compatibility-testing-in-ie/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/browser-compatibility-testing-in-ie/</guid>
<pubDate>Fri, 18 May 2012 23:31:23 GMT</pubDate>
<description>Oh the fun... Hopefully this will help you with testing in IE.

Internet Explorer Application Compatibility VPC Image
https://www.microsoft.com/download/en/details.aspx?id=11575

Utilu IE…</description>
</item>
<item>
<title>How to generate negative mass, traverse hyperspace and walk through walls, even with a dog.</title>
<link>https://craig.mayhew.io/blog/how-to-generate-negative-mass-traverse-hyperspace-and-walk-through-walls-even-with-a-dog/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/how-to-generate-negative-mass-traverse-hyperspace-and-walk-through-walls-even-with-a-dog/</guid>
<pubDate>Fri, 18 May 2012 23:19:55 GMT</pubDate>
<description>I came across this recently, it had me in stitches and I have no idea if it&#39;s serious.

It&#39;s a patent application for walking through walls. There are several gems in here including &quot;Upon reading his explanation, I realized that the thunderstorm is actually a hyperspace physics phenomenom.&quot; and my personal favourite &quot;How to generate negative mass, traverse hyperspace and walk through walls, even with a dog&quot;.

http://www.scribd.com/doc/20946878/Walking-through-walls-US20060014125A1

A…</description>
</item>
<item>
<title>Titanium on Windows: Error locating JDK: set $JAVA_HOME and make javac and jarsigner available via your $PATH</title>
<link>https://craig.mayhew.io/blog/titanium-on-windows-error-locating-jdk-set-java_home-and-make-javac-and-jarsigner-available-via-your-path/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/titanium-on-windows-error-locating-jdk-set-java_home-and-make-javac-and-jarsigner-available-via-your-path/</guid>
<pubDate>Tue, 13 Mar 2012 22:57:32 GMT</pubDate>
<description>Right click on my computer and then left click properties in the menu that appears.
	Go to the &quot;Advanced&quot; tab
	Click &quot;Environment Variables&quot; button at the bottom
	Click &quot;New&quot; under system variables.
	Set variable name as &quot;JAVA_HOME&quot; and variable value to &quot;C:\Progra~1\Java\jdk1.7.0_03&quot;. Be sure to use your correct version and if you have saved it outside of the default location you will need the correct path. Also note we have not added the bin directory on the end. Notice we have not got…</description>
</item>
<item>
<title>Intel 3.6Ghz Core I7-3820 with 32GBs of RAM and 7zip</title>
<link>https://craig.mayhew.io/blog/intel-3-6ghz-core-i7-3820-with-32gbs-of-ram-and-7zip/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/intel-3-6ghz-core-i7-3820-with-32gbs-of-ram-and-7zip/</guid>
<pubDate>Mon, 05 Mar 2012 13:17:28 GMT</pubDate>
<description>Recently upgraded one of my machines (all changed except the power supply, some drives and the case).

I&#39;ve gone for the 2011 socket motherboard P9-X79PRO due to it allowing for 8 DDR3 RAM slots and this incredible bargain processor, the Core I7-3820.

One problem I found with this board was the lack of room for a heat sink which meant some modifications to my Thermaltake Frio so it didn&#39;t block two of the RAM slots - not to mention the incredibly picky BIOS it comes with.

But anyway…</description>
</item>
<item>
<title>P9X79-Pro BIOS Flashing &amp; RAM issues</title>
<link>https://craig.mayhew.io/blog/p9x79-pro-bios-flashing-ram-issues/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/p9x79-pro-bios-flashing-ram-issues/</guid>
<pubDate>Sun, 04 Mar 2012 12:21:03 GMT</pubDate>
<description>So I&#39;ve unboxed my P9X79-PRO, screwed it in the case, fitted the cpu, heatsink and RAM. On the first boot it sits there with status code AF on the motherboard LEDs and the red LED solidly on to signify a problem with the RAM.

I know it&#39;s seated properly and it&#39;s supposed to be compatible RAM.

Rather than buy new RAM - I wanted to flash the bios with the latest version. With this motherboard you can do it - without any RAM, CPU or GPU! The feature is called Flashback. (It will also work…</description>
</item>
<item>
<title>25th Birthday</title>
<link>https://craig.mayhew.io/blog/25th-birthday/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/25th-birthday/</guid>
<pubDate>Fri, 27 Jan 2012 23:14:13 GMT</pubDate>
<description>Absolutely awesome birthday. I&#39;ve finally managed to upload the videos from my first flying lesson in an Ikarus C42. I took off at a local private airfield at 11:15 this morning (I was just a passenger for take off and landing and wasn&#39;t in any control). I was able to have a camera suckered to the side window to video the lesson. Take off is at 7:35 in the first video. The final video shows the landing at 11:00 and the inside cockpit at 13:25. The weather conditions were near perfect in the…</description>
</item>
<item>
<title>Firefox Tweak - Memory Cache</title>
<link>https://craig.mayhew.io/blog/firefox-tweak-memory-cache/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/firefox-tweak-memory-cache/</guid>
<pubDate>Mon, 23 Jan 2012 07:00:02 GMT</pubDate>
<description>A quick way to increase the responsiveness of firefox is to turn off the disk cache and turn on the memory cache. This will keep a cache of recently visited websites/images in the computer&#39;s RAM instead of on the hard disk.

Go into about:config and set browser.cache.disk.enable to FALSE, then right-click and select NEW -&gt; INTEGER and type browser.cache.memory.capacity  and set to 100000 (for 100mb).

Now your memory is being used for the cache instead of your hard disk. If you have loads…</description>
</item>
<item>
<title>Short, elegant Regular expression for primality testing</title>
<link>https://craig.mayhew.io/blog/short-elegant-regular-expression-for-primality-testing/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/short-elegant-regular-expression-for-primality-testing/</guid>
<pubDate>Sun, 22 Jan 2012 21:16:51 GMT</pubDate>
<description>/^1?$|^(11+?)\1+$/

I was thoroughly impressed with this regex. I&#39;m not going to reiterate what other people have already explained. So instead I will place links to other blogs that explain this very cool regex primality test.

http://montreal.pm.org/tech/neil_kandalgaonkar.shtml

http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/

http://zmievski.org/2010/08/the-prime-that-wasnt

Thanks to &amp;lt;a…</description>
</item>
<item>
<title>Christmas/New Year 2011</title>
<link>https://craig.mayhew.io/blog/christmas-new-year-2011/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/christmas-new-year-2011/</guid>
<pubDate>Tue, 03 Jan 2012 21:30:35 GMT</pubDate>
<description>This year has been a good haul, some awesome presents from B and family.

 I&#39;m a fan of difficult puzzles (ideally if there is a prize) to the point of sleep deprivation. Let me show you the Isis puzzle. It&#39;s titanium, heavy and fits in your hand (but not if you have small hands, then you need two). It&#39;s also nearly impossible to open. I&#39;m not giving away any clues at all, we managed it and I&#39;m looking forward to the next challenge.

 I&#39;m also a fan of LEGO and this year I was ecstatic to…</description>
</item>
<item>
<title>Increase Size of Windows 7 Partitioned Virtual Disk (vmdk)</title>
<link>https://craig.mayhew.io/blog/increase-size-of-windows-7-partitioned-virtual-disk-vmdk/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/increase-size-of-windows-7-partitioned-virtual-disk-vmdk/</guid>
<pubDate>Mon, 31 Oct 2011 10:00:25 GMT</pubDate>
<description>Log in to your vmware server.
Back up your virtual machine and all snapshots (The raw files on the physical disk - particularly the vmdk files as this will be what we are modifying)
Log in to vmware gui.
Power off your virtual machine (do not pause it!).
Delete all snapshots for this machine
Locate vmware-vdiskmanager.exe and adjust paths to run the following command (Change size in GB as you require):
C:\Users\user&gt;&quot;C:\Program Files (x86)\VMware\VMware Server\vmware-vdiskmanager.exe&quot;…</description>
</item>
<item>
<title>Critical SSL Weakness Found</title>
<link>https://craig.mayhew.io/blog/ssl-no-longer-secure/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/ssl-no-longer-secure/</guid>
<pubDate>Wed, 21 Sep 2011 17:54:54 GMT</pubDate>
<description>Researchers Thai Duong and Juliano Rizzo claim to have found a weakness in SSL encryption. It allows them to view anything that is encrypted with SSL and therefore supposedly secure. It affects TLS 1.0 and below which is just about every form of SSL currently supported by web servers and browsers. They will demo the exploit at Ekoparty security conference.

So the internet and ecommerce are now broken?

Don&#39;t panic - there is a fix - it just hasn&#39;t been written yet. TLS 1.1 and TLS 1.2…</description>
</item>
<item>
<title>Thoughts on Bitcasa&#39;s unlimited online storage</title>
<link>https://craig.mayhew.io/blog/thoughts-on-bitcasas-unlimited-online-storage/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/thoughts-on-bitcasas-unlimited-online-storage/</guid>
<pubDate>Sun, 18 Sep 2011 23:45:20 GMT</pubDate>
<description>Are we finally in the age of truly unlimited storage? It would be nice but I think the encryption issue will let it down.

Bitcasa think they can offer you unlimited storage for $10 per month. They achieve this magic by using deduplication which ensures that data is never deduplicated across any of their servers. So if I upload an mp3 and you upload the same mp3 it only exists once on their disk. Dedupe actually takes it further and breaks every file into chunks and makes sure each chunk is…</description>
</item>
<item>
<title>Ubuntu screen brightness on EliteBook 8530w</title>
<link>https://craig.mayhew.io/blog/ubuntu-screen-brightness-on-elitebook-8530w/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/ubuntu-screen-brightness-on-elitebook-8530w/</guid>
<pubDate>Sat, 03 Sep 2011 19:51:06 GMT</pubDate>
<description>Ubuntu versions 10.04 and 10.10 had various issues with the screen brightness on my HP EliteBook 8530w. It wasn&#39;t possible to adjust the brightness which was a real problem if the screen dimmed while power saving.

The only fix I&#39;ve found was to update to Ubuntu version…</description>
</item>
<item>
<title>Upgrading Ubuntu to 10.10 - blacklisted blcr-dkms_0.8.2-13 Error</title>
<link>https://craig.mayhew.io/blog/upgrading-ubuntu-to-10-10-blacklisted-blcr-dkms_0-8-2-13-error/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/upgrading-ubuntu-to-10-10-blacklisted-blcr-dkms_0-8-2-13-error/</guid>
<pubDate>Sun, 28 Aug 2011 11:28:19 GMT</pubDate>
<description>If you get the following error when you&#39;re upgrading:

An unresolvable problem occurred while calculating the upgrade:
Trying to install blacklisted version &#39;blcr-dkms_0.8.2-13&#39;

To fix, simply search for the package &#39;blcr-dkms_0.8.2-13&#39; in the package manager and mark it for upgrade. Click apply and then try the system upgrade once…</description>
</item>
<item>
<title>critical zero day wordpress security flaw with timthumb.php</title>
<link>https://craig.mayhew.io/blog/critical-zero-day-wordpress-security-flaw-with-timthumb-php/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/critical-zero-day-wordpress-security-flaw-with-timthumb-php/</guid>
<pubDate>Tue, 09 Aug 2011 20:12:32 GMT</pubDate>
<description>In a nutshell, timthumb.php is used to resize images in many wordpress themes and it doesn&#39;t check images from remote sources to make sure they really are images and not a malicious script.

To fix you need to change $allowed sites to be an empty array.

e.g. $ALLOWED_SITES = array();

An example of what you may initially find:

$ALLOWED_SITES = array…</description>
</item>
<item>
<title>Upgrading turnkey redmine from version 0.8.x to 1.0</title>
<link>https://craig.mayhew.io/blog/upgrading-turnkey-redmine-from-version-0-8-x-to-1-0/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/upgrading-turnkey-redmine-from-version-0-8-x-to-1-0/</guid>
<pubDate>Tue, 09 Aug 2011 20:00:41 GMT</pubDate>
<description>Upgrading the turnkey vm of redmine can be painful:

Hopefully this will take away some of the pain :)

cd /var/www
mv railsapp railsappOLD
svn co http://redmine.rubyforge.org/svn/branches/1.0-stable railsapp
cp ./railsappOLD/config/database.yml ./railsapp/config/database.yml
cp ./railsappOLD/config/email.yml ./railsapp/config/email.yml
cp -r ./railsappOLD/files ./railsapp/files
sudo chown -R root:www-data /var/www/railsapp
cd /var/www/railsapp
sudo chown -R www-data:www-data files…</description>
</item>
<item>
<title>Email Charter</title>
<link>https://craig.mayhew.io/blog/email-charter/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/email-charter/</guid>
<pubDate>Sun, 03 Jul 2011 22:40:39 GMT</pubDate>
<description>Would like to spread the word on this as email is taking up an increasing amount of my time (and server disk space/bandwidth!).

I already follow most of these rules but will be making more effort with number…</description>
</item>
<item>
<title>Remote Desktop Optimization for Firefox 4</title>
<link>https://craig.mayhew.io/blog/remote-desktop-optimization-for-firefox-4/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/remote-desktop-optimization-for-firefox-4/</guid>
<pubDate>Mon, 30 May 2011 16:31:15 GMT</pubDate>
<description>Firefox 4 has added some eye candy that greys out the webpage when an alert appears. This looks nice but is very slow over a remote desktop connection as it forces the entire window to be sent again to the client.

To fix, just add this to the end of userChrome.css


tabmodalprompt {
background: transparent !important }


The file should be found here: C:\Users\$username\AppData\Roaming\Mozilla\Firefox\Profiles\$letters.default\chrome\userChrome.css

If it doesn&#39;t exist then copy and…</description>
</item>
<item>
<title>CUDA Development in Visual Studio 2008</title>
<link>https://craig.mayhew.io/blog/cuda-development-in-visual-studio-2008/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/cuda-development-in-visual-studio-2008/</guid>
<pubDate>Mon, 30 May 2011 16:23:02 GMT</pubDate>
<description>When I started developing in cuda I had a bit of a nightmare setting up the development environment. This youtube video saved the day. Many thanks to Yuber Núñez for taking the time to make…</description>
</item>
<item>
<title>Automatically reboot minecraft on crashes</title>
<link>https://craig.mayhew.io/blog/autmatically-reboot-minecraft-on-crashes/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/autmatically-reboot-minecraft-on-crashes/</guid>
<pubDate>Sun, 01 May 2011 12:19:26 GMT</pubDate>
<description>The latest version of minecraft has been extremely unstable for me, so I&#39;ve written this quick script to automatically check if minecraft is running - and reboot it within 30 seconds if it isn&#39;t. You will need php installed for this script to work.


Install php on the minecraft server.
Save this code to a file named &quot;rebootCheck.php&quot;

&amp;lt;?php 
//options
$url  = &#39;localhost&#39;;//localhost or an ip address
$port = 25565;//25565 is minecrafts default port
$pauseLength = 20;//time between…</description>
</item>
<item>
<title>Generating SSL Certificates for Apache</title>
<link>https://craig.mayhew.io/blog/generating-ssl-certificates-for-apache/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/generating-ssl-certificates-for-apache/</guid>
<pubDate>Fri, 29 Apr 2011 17:32:05 GMT</pubDate>
<description>Generate a key:

openssl genrsa -des3 -out server.key 2048


Generate a certificate signing request (csr):

openssl req -new -key server.key -out server.csr

Country Name (2 letter code) [GB]:GB
State or Province Name (full name) [Berkshire]: Hampshire
Locality Name (eg, city) [Newbury]: Southampton
Organization Name (eg, company) [My Company Ltd]:Your Company Ltd
Organizational Unit Name (eg, section) []:Information Technology
Common Name (eg, your name or your server&#39;s hostname)…</description>
</item>
<item>
<title>OpenSim 0.7.1 RC1 and the shiny new media on a prim</title>
<link>https://craig.mayhew.io/blog/opensim-0-7-1-rc1-and-the-shiny-new-media-on-a-prim/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/opensim-0-7-1-rc1-and-the-shiny-new-media-on-a-prim/</guid>
<pubDate>Mon, 25 Apr 2011 16:53:21 GMT</pubDate>
<description>I&#39;ve installed the release candidate and had a play with the new media on a prim feature. At the moment it&#39;s only supported by the Second Life viewer. So, even though the OpenSim server supports it, none of the open source viewers do. I&#39;m very impressed with it although I quickly hit limitations as you can see in the image.



You may immediately notice that my avatar refused to render at all in the second life viewer. It does render fine in other viewers so I&#39;m not yet sure what the reason…</description>
</item>
<item>
<title>Tiny little universe</title>
<link>https://craig.mayhew.io/blog/tiny-little-universe/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/tiny-little-universe/</guid>
<pubDate>Fri, 22 Apr 2011 13:52:36 GMT</pubDate>
<description>After my last post about second life, it&#39;s time I got back on track about what I wanted from second life. For me, second life didn&#39;t allow me to design without limits. Mostly because it has an economy, an economy is built on rules and therefore limitations. I wanted a virtual environment that can extend and supplement my reality. I needed my own virtual space where rules are non-existent unless I impose them. I needed my own simulation. Enter openSim. openSim is a complete virtual environment…</description>
</item>
<item>
<title>Windows 7 registry file open with association</title>
<link>https://craig.mayhew.io/blog/windows-7-registry-file-open-with-association/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/windows-7-registry-file-open-with-association/</guid>
<pubDate>Tue, 22 Mar 2011 19:56:24 GMT</pubDate>
<description>For anyone that has accidentally clicked on an application, clicked &quot;open with&quot; and set it to open with another application by default. Here is how to fix it.

If you are lucky enough to still have a web browser open or some way of transferring files then put this file on your computer and run it. It will remove the default association for exe files.

http://craig.mayhew.io/uploads/2011/03/exe.reg

If you aren&#39;t lucky enough to be able to get this file to your damaged computer then you…</description>
</item>
<item>
<title>SSH Port Forwarding</title>
<link>https://craig.mayhew.io/blog/ssh-port-forwarding/</link>
<guid isPermaLink="true">https://craig.mayhew.io/blog/ssh-port-forwarding/</guid>
<pubDate>Wed, 16 Mar 2011 03:55:59 GMT</pubDate>
<description>A very quick reference for anyone that wants to tunnel data via SSH. In this case I am using RDP over SSH.…</description>
</item>
</channel></rss>
