November 17, 2009

Wow. 18 processes? That’s it?

Filed under: Unix — Jeff @ November 17, 2009 4:13 pm

I was just noticing that our incredibly out of date OpenBSD server at work has only 18 processes running on it.  That’s nuts!

image  
I’m used to my Ubuntu desktop at 177 when I’m not even doing anything.

How things change…

October 8, 2009

My first attempt at Focus Blending

Filed under: Photography,Unix — Jeff @ October 8, 2009 2:03 pm

My first attempt at focus blending.  I shot a few images on my G9 at lunch today and used enfuse to blend the exposures, neither of which had both pop cans in focus, into a single sharp image.

Near Focus:

focus_near-719911

Far Focus:

focus_far-756052

Blended Focus:

focus_blended-786777

There is a bit of a halo effect on the highlights on the tin can but otherwise it looks relatively good. 

The Process:

First align the images using "align_image_stack".  This would be more important if they were hand-held or something crazy like that.  This produces "aligned_img1.tif" and "aligned_img2.tif".

$ align_image_stack -a "aligned_" -m img1.jpg img2.jpg

Now run them through enfuse to blend the focus:

$ enfuse –wExposure=0 –wSaturation=0 –wContrast=1 –HardMask -o test.jpg *.tif

This takes a long time (a minute or so) but the result is pretty decent.  Not bad for free software!

January 25, 2007

Switched to Mac

Filed under: Unix — Jeff @ January 25, 2007 7:55 am

Anji and I ordered a new computer just after Christmas. My laptop is still good but hers was on its last legs and the other 8 or 9 machines I have make good servers but are not so great for modern desktop operating systems. It was definitely time to get another computer :)

This time we did something rather different (for us) and ordered an iMac instead of buying from Dell or building something from components. I was a little worried at first and not entirely sure if I’d like switching operating systems but I have to say I LOVE IT.

I’ve been using the iMac for everything, at home, for the last few weeks and it’s awesome. Everything just works right out of the box and the applications, bundled and otherwise, are definitely of a better quality than your standard Windows application.

I still use Windows at work and I’m finding more and more I’m using the wrong hotkeys for things since the Mac command button (which behaves similar to control in Windows) is where my Alt key is. I’m also really missing some of the awesome Mac applications like Quick Silver.

I really love that the Mac is Unix based and comes with an SSH server so I can login remotely and do useful stuff like transfer files around and view my address book (I’m using the Apple Address Book and a third party viewer called contacts that provides a console interface to Address Book).

It was even easy to setup the iMac to mount several NFS shares from one of our Linux servers (aside from some screwing around getting the UID/GID the same between machines since I’m not using NIS or other directory service).

The applications I use on the Mac and couldn’t live without:

  • Adobe Photoshop Elements 4.0 ($)
  • Bibble – Raw Conversion ($)
  • iPhoto + Flickr plug-in ($)
  • Apple’s Address Book
  • Freemind – Nice cross-platform mind mapping tool
  • iTunes
  • TextMate – Awesome text editor ($)
  • Quick Silver
  • Usual Unix-y utilities like subversion, ssh, rsync, etc.

December 19, 2006

IPv6

Filed under: Unix — Jeff @ December 19, 2006 10:46 am

So thanks to Hurricane Electric’s tunnelbroker.net I now have a shiny IPv6 address for my Linode machine (2001:470:1f01:ffff::1a33/127). I wonder what I can do with it that’s actually useful.

So far I’ve managed to ping the outside world and they can ping me. Oh Joy!

April 26, 2006

Backupy Goodness

Filed under: Development,Unix — Jeff @ April 26, 2006 8:25 am

I have a lot of data scattered around the Internet on various servers. A lot of my personal data exists on an account on a server at Dreamhost. I also have a some servers at home and a client’s webserver with about 12G of data on it. All in all I’m responsible for about 15G of data out there and I would like that data to be backed up with some regularity.
Obviously this is enough data that just downloading the whole mess every week or so is a poor choice. Luckily there is rsync. Rsync is a very handy utility that can synchronize two directories without transfering unchanged files needlessly.  It’s very efficient and just perfect for this task.
My setup is pretty simple. I have a central backup server with limited inbound access and a big HDD running OpenBSD. All of my remote machines are Unix-y boxes and accept SSH connections. Every week my backup server connects to the remote machine using rsync over SSH and sychronizes a snapshot directory on my system with the remote data. The first time I ran this it had to transfer all 15G of data and it took a long time but subsequent backups only transfer data that changed so they are pretty quick (usually).

This alone would be great but I also want some backup history. Unfortunately my drive is only 80G and storing many weeks of data = tonnes of space. Luckily there is a neat trick you can pull with rsync. You basically create a new snapshot directory from the old one where each file is a hardlink to the file in the old backup set. Then when you run rsync it will replace the changed files but the unchanged ones are still just hardlinks to the original so you can store months of backups without using much space. New versions of rsync even have a fancy option to make this super easy.

I’m sure that really didn’t make much sense.  It’s explain really well here so I don’t feel the need to spend more time on it:

Anyways I wrote a script to make this all real easy. If you are in need of a simple backup solution and your situation roughly matches mine it might be worth a peek :)