I built some mrore shelving in the shed. We've had this coffee table hanging around in the shed for ages. So I made it into something useful. First I trimmed the lip from around the longer sides, then I set up the panel saw attachment for the Triton MK3 Table Saw and cut the table in half giving me two nice sgelves to use.
Friday, 28th June 2013 - 11:34:28
Written by
on June 28, 2013 .Friday, 28th June 2013 - 10:17:15
Written by
on June 28, 2013 .Today I made some cable hangers out of recycled pine playpen secions. This project turned out much better than I anticipated.
It was just a matter of running the play pen section rail up against the table saw to give the length of peg required. I then made a vertical part and "hook" shape to go over a rafter.
Tuesday, 25th June 2013 - 12:02:54
Written by
on June 25, 2013 .I managed to convince the boss that it'd be better to use Raspberry Pis behind each of our monitoring screens rather than one large PC with one or more multi-port graphics cards. I've prepped an image so that the Pis don't switch off automatically and I've also changed their HDMI driver mode to 2 - so that we can do audio down the HDMI. Other than that - there are a few modifications to xinit files for the pi user to get the browser to come up fullscreen on startup. Fun little project!
Friday, 21st June 2013 - 16:42:00
Written by
on June 21, 2013 .Friday, 14th June 2013 - 15:49:42
Written by
on June 14, 2013 .Had some luck today making some half-lap joints on the table saw using 2" x 4" and 2" x 3" timber. I was inspired after watching a bunch of Jay Bates' woodworking videos on Youtube. He tends to create a lot of 2" x 4" projects with half-laps.
Wednesday, 12th June 2013 - 17:38:41
Written by
on June 12, 2013 .Monday, 9th June 2013 - 18:02:34
Written by
on June 10, 2013 .I spent some time stripping paint off and sanding some boards from an old set of shelves with the intent of using them on a small project. When I got all of the paint off I was surprised that it wasn't pine or something like that - it actually looks like maple. So it's really too nice to use for the project I prepared it for.
I started by screwing the boards to a long aluminium straight edge and ripping one side on the table saw. The boards were bowed and not straight, but mostly flat. From there I found a width that matched both of my boards and ripped the other side off, using the newly cut edge against the fence. This way both pieces were exactly the same width.
Then if was onto the work bench for a sanding. This is the first time I'd used my 4" belt sander hand held, it's normally sitting in a jig to use it as a vertical belt sander / linisher. With 40 grit paper on this thing is hard to control! Once the paint was off, I sanded the sequence up to a fine unmarked paper which feels like it's maybe 240 or so. This is the finest I had on hand.
Typically the wood I buy is already sanded, probably to 400. This was good practice anyway. I've always been keen to rip, joint and thickness plane my own lumber.
Looks like I'll go off to Bunnings at some stage and get some pine for the job and keep this unexpectedly nice wood for something else!
Sunday, 9th June 2013 - 08:01:35
Written by
on June 9, 2013 .Up early this morning (noisy kids).
I enabled the PowerShell and Shell-Session lexers in Pygments:
Import-Csv -Path New-VMs.csv | `
ForEach-Object {
New-VM -VMHost $_.VMHost -Name $_.Name -Template $_.Template -Datastore $_.Datastore
}
[timd@fedorabox ~]$ yum install eric
Loaded plugins: fastestmirror, langpacks, refresh-packagekit
You need to be root to perform this command.
update wiki_wikipage set article = replace(article,'</code>','{/code}');
Saturday, 8th June 2013 - 12:17:13
Written by
on June 8, 2013 .Today I looked at an issue I was having with the syntax hilighting on my site. The way it currently existed, you needed to exit the blog entry html directly to get code in the post using a <code> tag. I've now switched to code in square brackets. This means that the you can add code snippets in the GUI editor, however, TinyMCE comes along and says "I'm helping" and replaces all of your spaces with nbsp and all of your carriage returns with break tags. So, I've found you need to reverse that with a replace prior to parsing the code in pyments. The end result is pulling a bunch of stuff out, parsing and hilighting, then putting it back.
Pygments Python Syntax Hilighter Rules!
lexer_string = ''
if match_obj.group(3) is not None:
lexer_string = match_obj.group(3).lower()
if lexer_string in ['c','cpp','c++','cpplexer']:
lexer = CppLexer()
elif lexer_string in ['py','python','pythonlexer']:
lexer = PythonLexer()
#include <htc.h>
#define _XTAL_FREQ 20000000
__CONFIG (CP_OFF & CCPMX_RB0 & DEBUG_ON & WRT_OFF & CPD_OFF & LVP_OFF & BOREN_ON & MCLRE_ON & PWRTE_OFF & WDTE_OFF & FOSC_HS);
void putc(unsigned char dt);
void led_digit(unsigned char digit, unsigned char position);
void led_readouts(void);
void led_integer(unsigned int number);
void led_raw(unsigned char raw);
void led_hold(void);
unsigned int get_adc(unsigned char chan);
bcf STATUS,RP1
bsf STATUS,RP0 ; Select Bank 1 of data memory
movlw 0xD7
movwf OPTION_REG
bcf STATUS,RP0
bcf INTCON,GIE ; Disable all interrupts.
Friday, 7th June 2013 - 21:36:27
Written by
on June 7, 2013 .Decommissioned the old Cisco 857 ADSL router and the Linksys SPA3102 ATA/Router today. The new cable box has both router/wireless and also incorporates an ATA.
I'd still like to put together an Elastix system at some point and use the SPA3102 as a voip to copper bridge/trunk (piggiebacked on the current ATA).
Thursday, 6th June 2013 - 21:33:29
Written by
on June 7, 2013 .Monday, 3rd June 2013 - 21:01:45
Written by
on June 3, 2013 .Sunday, 2nd June 2013 - 09:20:49
Written by
on June 2, 2013 .Saturday, 1st June 2013 - 12:10:47
Written by
on June 1, 2013 .Ooops. I's got a big bug in my twitter API code for the site =/
$ psql
Type "help" for help.
=# select count(id) from mytweets_mytweet;
count
-------
62479
(1 row)
EDIT:
It turns out that I was relying on a DB constraint that didn't make it through the server migration - so the code was just jamming records in after each Twitter API GET. The insert is wrapped in a try/catch so that it will not bail when there is an integrity error (duplicate keys). With the field not set with a unique constraint - the code just keeps happily sticking records in there... All good now.
Saturday, 1st June 2013 - 00:21:46
Written by
on June 1, 2013 .I've spent today hacking in some new features for the gallery. Unfortunately, not public facing. Just stuff to assist in uploading photos.
The most comprehensive change is the new photo selector and having a stockphoto (django module) photo attached to all blog posts. There was some messing about with column types and casting and alterting tables in postgres to make it play nice. The field for an article image used to be just a character varying field, it's now an integer field with a proper foreign key relationship to the stockphoto module.
In the admin section, there is now a nice jquery-ui based dialog for selecting from group to gallery to photo and updating the field. This is much better for photos because the standard django select widget is not up to the task. I mean it works fine, but you really don't want to have to choose through a list of "IMG_1235.jpg" etc etc - you really want a thumb.
Getting this custom functionality was just a matter of overriding the admin template for that app by creating an <app>/templates/<app>/<model>/change_form.html/. Secondly, the forms.Widget widget is wrapped so that we can append whatever we want in the admin section - in my case just a text box and a "browse" button. The real work is done in jquery code in the template.
Sadly, updating jquery-ui has borked a few things like tag autocompletion.
Friday, 31st May 2013 - 13:32:19
Written by
on May 31, 2013 .I received my PCB today from http://dangerousprototypes.com/ FreePCB Drawer
Saturday, 25th May 2013 - 13:20:56
Written by
on May 25, 2013 .Wednesday, 17th April 2013 - 11:08:29
Written by
on April 17, 2013 .Friday, 5th April 2013 - 22:35:00
Written by
on April 5, 2013 .Thursday, 4th April 2013 - 18:46:20
Written by
on April 4, 2013 .I've recently set up an ESXi lab with 3 servers. The problem with enterprise servers in a home environment is the noise and the power consumtion - obviously you are not going to want to have a rack full of gear running 24/7 at home. The other issue is the standby power consumption at ~100W each when they are powered down. Some of them have components that run even when the system is off.
The solution: Turn them off after a session in the lab experimenting or studying. Then unplug them.
My servers are in a shed away from the house - so I don't really want to go out there at the end of a session at 12:00AM or when it's raining or whatever. The same goes for powering the lab on.
You may recognise these parts from other projects I've built. The Fermentation Controller was designed to control up to 4 mains devices with triacs. The Fermentation Controller was to be controlled with a parallel interface (which of course nothing has now). The Fermentation Controller consists of two dual triac boards which will switch up to 10A each at mains. They will not be working too hard in their new job controlling only a max of about ~1KW across the 3 servers under load. The brains of the power rail is the TG Watchdog. This is an RS232 controlled board which allows you to toggle it's four outputs using a terminal emulator. This can also be wrapped with an expect script or py-expect etc etc to make it more friendly or automate it.