TechnoHippy

Technology and Environmentally friendliness… Can it mix?

Technology

RepRap… the beginning

I figured I should document my RepRap progress (and beat out the “lack of” part) Up until now I have acquired a set of printed plastic parts for a Prusa Mendel RepRap – http://reprap.org/wiki/Prusa_Mendel from Dust Hopefully, this will be a nice wee way for me to keep a photo diary and link diary of [...]

Posted in RepRap | No Comments »

Raspberry Pi

It is a nice little 700Mhz ARM based computer, 1080p graphics (HDMI), 256MB RAM. Some swanky looking GPIO pins on top – much like an arduino. Plenty of different models of breakout boards for these, from proto boards to xbee adapters to smd chip adapters… I’m going to use one for my home monitoring and [...]

Posted in Home Automation, Home Monitoring, Raspberry Pi | No Comments »

A few links on Git

I’m just looking into the viability of running an app called GitLab on my webserver for my business code. Information: GitLab: http://gitlabhq.com/ – this is the software I would be using. As you can see it’s actively maintained and updated. It would be set up for private repositories only. GitHub: https://github.com/ – this is what [...]

Posted in Programming-related | No Comments »

multi-language text field

Today I asked in #rubyonrails: How can I have a model with a text field and have that text field in multiple languages? Epic thanks to Radar for the answer: http://frozenplague.net/2009/11/scoping-by-locales/

Posted in Technology | No Comments »

Old stuff?

Just looking through some old blog posts and GitHub archives this evening… and came across SettingsLogic. Now, the guy that wrote this has done some awesome stuff such as SearchLogic and others. SettingsLogic looks pretty similar to my original AppConfig way of doing things, which I like. What I still want, however, is a database-driven [...]

Posted in Technology | No Comments »

I had to giggle…

Posted in Technology | No Comments »

Sorting Multidimensional Arrays

For future reference really: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Controller::loadModel(’Student’); $students = array(); foreach ($courseStudents as $crsstd) { $students[] = array($crsstd, $this->Student->find(’first’, array(’conditions’ => array(’Student.id’ => $crsstd[’student_id’])))); }   function compare($x, $y) { if ( $x[1][’Student’][’lastName’] == $y[1][’Student’][’lastName’] ) return 0; else if ( [...]

Posted in Technology | No Comments »

Why I love testing…

test “suicide” do   user = users(:steve)   assert !user.has_life?   assert user.destroy end

Posted in Technology | 1 Comment »

CSS colour chart

For reference, a Nice simple CSS Color Chart Takes a little while to scroll down the page, but I like the fact that its very easy to see the colours and that each one is named (even though it is such as gray1,gray2,etc)

Posted in Technology | No Comments »

Python script to log dhcp leases

Thought I would share this. It is called from DNSMasq in the dnsmasq.conf file: dhcp-script=/home/nate/logdhcp.py enjoy #!/usr/bin/env python import sys, string, array appendLine=1 if sys.argv[4]: f=open(‘/home/nate/dhcplog’, ‘r’) lineArray=f.readlines() for line in f: lineArray.append(line) for line in lineArray: if line == (string.join(sys.argv[1:])+”\n”): appendLine=0 f.close() if appendLine==1: f=open(‘/home/nate/dhcplog’, ‘a’) f.write(string.join(sys.argv[1:])+”\n”) f.close()

Posted in Technology | 1 Comment »