Craig Mayhew's Blog
Open Source craig.mayhew.ioby Craig Mayhew on Sun 15th Feb 2015 under Code
You can't steal secrets from someone that has none. On that note, I'm 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've moved away from using mongodb and instead store the blogposts and pages in simple json files (one file per page/post). It's currently at about 230MBs including photos and screenshots.
CRC are hiring and created an interesting videoby Craig Mayhew on Wed 05th Nov 2014 under General
This is what happens when you ask developers to create a recruitment video:
RaspberryPi Automated USB Eraserby Craig Mayhew on Thu 31st Jul 2014 under General
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 RaspberryPi 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 pin.
Run the following commands
sudo apt-get install usbmount
chmod 755 /etc/usbmount/mount.d/01_wipe_data
Restart the RPi and away you go.
Full source code available here: https://github.com/craigmayhew/USBCleanser
My Reprap Mendelby Craig Mayhew on Wed 09th Apr 2014 under General/Techie
It all started with a cat and some plastic...
In 2010 when Beth and I started building the reprap, we anticipated it would take us a month or two. We we're wrong. We had almost no tools, no work space and limited engineering knowledge. Sometimes because work was just too busy, we wouldn'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't until this weekend just passed that I finally tweaked the reprap into having a good enough accuracy to print replacement and upgraded parts for itself. Now of course, the mendel reprap is outdated and many parts have been improved or are completely replaced in the latest available designs. It will take several months of spare time to bring the printer up to date. I've already got a list of improvements to add including;
- - Moving both z axis motors up on top of the rep rap to improve print height and reduce problems with the two z axis worm gears getting out of sync.
- - A small fan to cool the extruded plastic much quicker. This will also improve printing of bridges.
- - Using a ribbon cable to replace all wires to the x carriage.
Economics of SETI on AWS spot instanceby Craig Mayhew on Mon 25th Nov 2013 under General/Techie
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 - and we run 2 of these, one per core
So 3 1/3 hours * 0.016 = 0.053 cents per 100 points
So about 3p per 100 points.
NX Server on CentOS 6by Craig Mayhew on Sun 10th Nov 2013 under Linux/Ubuntu
yum install nx freenx
cp node.conf.sample node.conf
Ensure that this line is not commented out:
Setup NX Server
nxserver --adduser craig
nxserver --passwd craig
chown nx:root known_hosts
Install NX client
Depends on your operating system, in my case it was windows https://www.nomachine.com/download
Grab DSA key from here that you will need for the client