EeePC1000H Continued

Been spending a lot of time playing around with the EeePC. Overall impression has been universally awesome, and it certainly gets a few looks for it’s tiny size.

I’ve got it well and truly tweaked now, including two-factor authentication with pam_usb, motion-sensing CCTV on the webcam when the screen is locked, bluetooth proximity linked automatic locking/unlocking with my phone, conky on the desktop, compiz fusion and a nice custom dark theme based on clearlooks, plus some helper scripts to tune the fanspeed to something a little quieter than default.

My one complaint would be the keyboard. It’s hardly solid, and I’ve had one key skip off. That said, it’s on a par with most laptop keyboards. Recommendations for good, portable keyboards would be appreciated.

I’m also looking at how best to organise notes. I’ve been using Tomboy for now, but it’s got a few snags which kill it for me:

  • Notebooks are woefully underimplemented
  • Links are cross-notebook
  • Organisation is hard to achieve
  • Categories don’t exist, nor do tags or the like

So I’m down to A) write my own, or B) use something like WordPress, Radiant or Mediawiki to cook my own from another base. I’ve already got all my dev tools (and a whole crapload of wireless/network security tools, too :p) on the box, so running a webserver isn’t a problem.

I’ve been hunting around on eBay for a bluetooth GPS and a USB wireless device. I’ve found a Holux 236 bluetooth reciever which should work great with gpsd to connect to Kismet for wardriving and general Wireless-GPS correlation. I still need to hunt down a USB wireless card to connect up so I can use external aerials for my laptop, and then I think I want to get my laptop some power off my car’s 12V power, probably needing an inverter for that.

Perfect Circle

Yup, back on WordPress.

Radiant is an awesome CMS, but it’s still at heart a CMS. Mephisto is just undermaintained and hasn’t got any buzz around it, but WordPress still manages to impress me as a piece of software. I’m willing to overlook that dark, PHP-based heart nestling under the pretty face.

I’m also intending to start blogging more often, and finally might get some purpose to these posts. I’ve got Twitter for my outpourings now, so hopefully I’ll continue the trend I started with more Rails, EVE and other dedicated posts on those topics rather than my usual rambling post about everything. Oops.

My laptop is very, very sorted at this point, and I plan to dedicate a few posts detailing my setup and steps to reproduce it. I’ve got everything from Compiz to monitor-mode WLAN, 2-factor authentication using one-time-pads on a USB stick to Processing running well. Not bad for a £300 bit of kit, and certainly above my expectations as to what I could achieve with it. I’ve been playing around a lot with wireless gear too, and plan to have some serious playtime with WPA2 at some point. Certainly a moderately serious aerial project is on the cards for the EeePC!

Selectively modifying attr_accessible

I came across the need to have a user list with checkboxes for ‘admin’ and ‘fleet_commander’ to allow them to be set. Which works great- until you realise that your user model is protected from forms setting those fields!

This was using the ‘Toggle Attributes with Ajax’ recipe from ‘Advanced Rails Recipes’- an excellent book, and one I’d recommend.

Essentially, I had a remote update function using AJAX, which sent a user params hash with the appropriate value set. However, to let the form update the model, I had to use some class_eval magic:

def update
  1.     if current_user.admin?
  2.       User.class_eval('attr_accessible (usual stuff), :admin, :fleet_commander')
  3.     end
  4.     # continue onwards with updating using update_attributes
  5.   end

This temporarily adds the :admin and :fleet_commander attributes to the list of accessible attributes by calling attr_accessible in the context of the User class. Hope this helps someone in the same scenario!