Monthly Archives: June 2012

Quickly Sync JPG mtime with EXIF CreateDate

I borrowed a few things, made a few changes, and now all my photos have the correct timestamp on the filesystem. Hooray! The script expects to be in the root directory of the album hierarchy, but that is merely because I am lazy. And it was an excuse to learn about how to find where [...]

Opscode Chef Xtra: Obtaining network interface data

It is somewhat of a challenge to obtain interface information out of the data Ohai makes available for network interfaces. For information only about inet addresses, the following works: node_addresses = {} node[:network][:interfaces].each do |iface, vals| vals[:addresses].each do |addr, h| next unless h[’family’] == ‘inet’ && !addr.match(’127.0.0.1′) iface_data = Hash.new iface_data = h.dup iface_data[’address’] = [...]