The ramblings of Steve-0Posts RSS Comments RSS

Use iDisk to synchronize IM Chat Logs

Like email, my IM chat logs have become a critical reference and database for me. With both OS X’ spotlight and Adium’s chat transcripts, searching for a conversation in these logs is quite easy. However, not so much so when I’m on my laptop at home, and the chat took place on my work computer. I am looking into services like simkl.com, which act as a proxy and store your chat logs an their servers - but, these don’t have the search interface I’m used to, and I’m not sure I’m ready for yet another company to have access to my personal communications.

So, here’s the procedure I am using to sync my logs using my iDisk included with my MobileMe subscription. It is pretty rudimentary, but works nicely for what I want it to do.

Here are the relevant references I used when putting this process together, as I didn’t feel like spending much time on this:
http://www.macosxhints.com/article.php?story=2008071710372562
http://www.bombich.com/mactips/rsync.html
http://lingon.sourceforge.net/

First, I built the latest rsync based on the link above - not that its really needed, but I figured it wasn’t a bad idea to have the latest, greatest, and most efficient.

Second, you need the actual script, here’s mine, with some names removed:

#!/bin/bash

# Sync all data from Chat logs to MobileMe iDisk

export LOG=/Users/myname/idisk.log

echo `date` > $LOG
echo "Starting copy of Adium Chat History to iDisk..." >> $LOG

rsync -a -E -4 -u --exclude=.DS_Store --stats --progress /Users/myname/Library/"Application Support"/"Adium 2.0"/Users/Default/Logs/ /Volumes/myidisk/ChatLog/ >> $LOG
rsync -a -E -4 -u --exclude=.DS_Store --stats --progress /Volumes/myidisk/ChatLog/ /Users/myname/Library/"Application Support"/"Adium 2.0"/Users/Default/Logs/ >> $LOG

echo "Backup of Chat Logs to iDisk complete..." >> $LOG
echo "" >> $LOG
echo `date` >> $LOG

exit 0

Now, I created a new job in Lingon to run the sync script. I named it com.myname.idisk.rsync, selected the script I had created (saved in ~/bin), and set it to run every 2 hours. After logging out and back in, everything was up and running. Status can be checked in the log file - after a long initial run, things run very quickly.

You’ll want to repeat this process on any other computer you have for it to work properly. After spotlight reads in all the new files, you should have searchable chat logs on all your macs.

Need to do: check and mount iDisk if not already mounted, and first check for internet connectivity. Also, some error reporting would be nice… Maybe via growl?

No responses yet

Firefox 3 - Opening a URL in new tab using command-enter

Download/Install UseMetaKeys FireFox Extension

In celebration of the release of Firefox 3 yesterday (and since I had forgotten to install my extension previously), I am posting this quick, dirty, and oh so helpful firefox extension.
Firefox has long been my preferred browser, although for the last year or so Safari had been gaining ground. Firefox 2 was just to bloated and slow, especially on OS X, and Safari was much faster. I always had a hard time choosing between the additional functionality Firefox provides, and the simplicity and speed of Safari. With Firefox 3, that’s pretty much over, and it is back in its place as my primary browser.
However, one thing that has always bugged me about firefox on Mac OS X was that you can’t open a URL in a new tab using Command+Enter, it only works with Option(alt)+Enter. I couldn’t find a fix a year or two ago, and with some quick searching today, I still did not find a good way to reassign the key sequence. So, I looked up a couple howto’s, found a sample/donor project, and whipped up a simple extension with a single purpose - remap Command-Enter to open a url in a new tab (i.e. when typing in the address or search bars). As expected, no support is provided, no warranty intended, etc., but if you’re using Firefox on OS X, I highly suggest installing this.

For some reason, I called it “UseMetaKeys”, and now, a year later, I am too lazy to change the name.

2 responses so far

Updating RedHat/CentOS Kickstart with new drivers

At work, we have a kickstart setup we have been using for a couple years now, with probably 150 servers out in the field based on this install. Our distro of choice is CentOS, a RedHat clone, and we are at version 4.4. This is out of date now, but it still works great for our needs, as security fixes are regularly back-ported. It would also be a major pain to upgrade our existing installations, and/or support multiple OS versions.

On to the issue at hand: we recently received some new server models that we’ll be supporting, both which have hardware not supported in CentOS 4.4. One machine has a RealTek RTL-8110 ethernet chip, and the other as a 3Ware 9650SE Raid controller. As I later discovered, this presented two unique problems with the kickstart - without the proper storage controller driver, one server didn’t find any disk to install on, and without the proper network driver, the other server couldn’t even connect to our kickstart server at all.

So, as you might guess, there are two different solutions here. The more elegant is for the storage controller, we can create a driver disk with the proper drivers, and make it available on the network during the kickstart. The network driver is more difficult - we need to insert it into the initrd image we provide for PXE boot, and then somehow copy it over after installation (this is an updated driver, r8169.ko, that exists in CentOS 4.4 but doesn’t support our newer card).

Adding a RAID/Storage Card Driver to the Kickstart:
For the driver disk, things are especially easy, as 3Ware provides a driver-disk compatible download, although not yet in the correct format to share over the network.

The driver provided by 3ware (http://www.3ware.com/KB/article.aspx?id=14546 ) includes the following:

-rwxr-xr-x 1 stever stever 66B Oct 10 2007 modinfo*
-rwxr-xr-x 1 stever stever 249B Oct 10 2007 modules.alias*
-rw-r--r-- 1 stever stever 377K Oct 10 2007 modules.cgz
-rwxr-xr-x 1 stever stever 28B Oct 10 2007 modules.dep*
-rwxr-xr-x 1 stever stever 463B Oct 10 2007 modules.pcimap*
-rwxr-xr-x 1 stever stever 192B Oct 10 2007 pci.ids*
-rwxr-xr-x 1 stever stever 339B Oct 10 2007 pcitable*
-rwxr-xr-x 1 stever stever 37B Oct 10 2007 rhdd*

This is all you need on a driver disk, so all you need to do is create a disk image, and copy these files over:

#Create a blank, 20MB image
dd if=/dev/zero of=/root/driverdisk.img bs=1M count=2
#Format the image with ext2
mkfs -t ext2 -q /root/driverdisk.img
#mount it and copy the files over
mount -o loop /root/driverdisk.img /mnt/tmp
cp /root/3ware/* /mnt/tmp/
umount /mnt/tmp

Now, copy the image over to somewhere accesible on kickstart, and update your ks.cfg with the following:
driverdisk --source=nfs:servername:/vol/kickstart/CentOS-4.4-x86/drivers/driverdisk.img

On network kickstart, anaconda should grab the driver, load it, and proceed normally. This should work for any non-network-card driver you need.

Adding a Network Card Driver to the Kickstart:
This is considerably more arduous, but not too difficult with the magic commands. Much of the information here comes from my friend Steve, www.kehlet.cx.

There is no nicely package/built driver provided by RealTek, just some source code with instructions for compiling.

I downloaded the driver here:
http://wiki.centos.org/HardwareList/RealTekr1000
After untar’ing unzip’ing, I ran make with the default settings, and manually changed the kernel version to build a smp driver as well (assuming you’re building on a single-cpu system):

[root@lb4 ~]# cd r8169-6.006.00/
[root@lb4 ~]# make
[root@lb4 ~]# mv src/r8169.ko r8169.ko.2.6.9-42.EL
[root@lb4 ~]# make clean
(edit src/Makefile, change the line “KVER := $(shell uname -r)” to “KVER := 2.6.9-42.ELsmp”
[root@lb4 ~]# make
[root@lb4 ~]# mv src/r8169.ko r8169.ko.2.6.9-42.ELsmp

Now you should have two .ko module files compatible with the different kernels - we need to get these inserted into the initrd image. An initrd is basically a disk image that holds various drivers and programs needed to pre-boot your system. It is usually a gzipped disk image file, so its nothing too special. Basically, you need to unzip & mount the initrd image, gunzip/cpio the modules.cgz file in the initrd, make the required changes, and package everything back up.

Here’s those steps in gory detail:

mkdir /mnt/tmp
mkdir /mnt/initrd
mkdir /var/tmp/work
mkdir /var/tmp/work/bootnet
mkdir /var/tmp/work/drvnet
gunzip < /root/tftpboot/initrd.img > /var/tmp/work/bootnet/initrd.img.ungzipped
cd /var/tmp/work/bootnet/
mount -o loop initrd.img.ungzipped /mnt/tmp2
cd /mnt/tmp2/modules
gunzip < modules.cgz | (cd /var/tmp/work/bootnet && cpio -idv)
cd /var/tmp/work/bootnet/2.6.9-42.EL/i686
cp /root/r8169-6.006.00/r8169.ko.2.6.9-42.EL r8169.ko
cd /var/tmp/work/bootnet/2.6.9-42.ELsmp/i686
cp /root/r8169-6.006.00/r8169.ko.2.6.9-42.ELsmp r8169.ko
cd /var/tmp/work/bootnet/
find 2.6.9-42.EL | cpio -ov -H crc | gzip > /mnt/tmp2/modules/modules.cgz
#edit /mnt/initrd/modules/pcitable
#add this:
0×10ec 0×8167 “r8169″ “Realtek|RTL-8110 Gigabit Ethernet”
umount /mnt/initrd
gzip < initrd.img.ungzipped > initrd.r8169.img

I had to boot up DSL, run lspci & lspci -n, to get the ID to put in here - third column has 10ec:8167, which is what we need
https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/2007-September/027142.html

So now you can replace your initrd.img with the one you just created. The kickstart should work fine now, but upon reboot, the system will not be able to find the right driver. After the kickstart, you need to copy over the .ko files to the appropriate directories - we added a line in our post-install script to do this for us, it simply copies the .ko file to the appropriate directory (/lib/modules/`uname -r`/kernel/drivers/net/)

Hopefully this is useful to someone, I couldn’t find a good, comprehensive guide on how to do this, I had to pull data from a bunch of different sources.

No responses yet

Photos from our trip now online

I finally fought the jet-lag, and got around to posting photos from most of our trip.

All of them are available on my main picasa page,
http://picasaweb.google.com/stevendavidruiz

And now for individual galleries:
I added some underwater photos to our snorkeling gallery:
http://picasaweb.google.com/stevendavidruiz/SnorkelingInMalaysia

A great Hike we went on in Taiwan - Caoling Historic Trail
Along the Chao Phraya in Bangkok - River Cruise
Pattaya, Thailand
Misc Thailand Photos
Around Taipei

No responses yet

New photos from Malaysia

I posted some new photos from our trip to Malaysia - I’ll be writing something about the trip in a day or two, but for now, enjoy the pictures :).

Picasa Photo Gallery

No responses yet

Gaggia Baby Pressure Adjustment with OPV Valve

When I first brought home my Gaggia Baby espresso machine, it had been used for a number of years, and not cleaned very well. I tried a few shots from it, but no matter what I did, they always came through too fast. When I adjusted my grinder to the point that the burrs were touching, the espresso would come out slowly at first (and look good), and get gradually faster until the shot was done after about 15 seconds. If you are having these issues too, its time to take a close look at the brew pressure of your machine.

The OPV, or over-pressure valve (also known as pressure relief valve), is fitted to most mid-level home machines with vibratory pumps. Vibe pumps aren’t really precision adjustable devices, so they espresso gaggia baby opv valve installed are basically either on or off, and inside an espresso machine, whatever pressure they’re operating at is the pressure you’re getting through your espresso. In most espresso machine marketing literature, they advertise the power of pumps, 16 bar in this one, 18 bar in that one, but this really doesn’t matter - espresso needs about 9 bar, give or take, to be brewed properly, and this is where the OPV comes in. As the pressure raises, it will gradually open up to maintain a set pressure, usually about 9 bar in an espresso machine. Excess water is routed back to the reservoir, and the group head, and thus your espresso puck) see’s the proper pressure. Gaggia Baby and Classic models are fitted with an adjustable OPV, other models don’t have one, but if you can find one its a great upgrade for a Carezza or Espresso.

espresso gaggia baby opv valve scaled shutAs you can read in some other posts here, the Gaggia machines are very easy to take apart and repair/clean, so while going through that process, I spent extra time on cleaning / restoring the OPV valve. It turns out that mine was completely sealed shut from past years’ scale deposits, and it wasn’t opening at all. I took the valve apart completely, and soaked it in a durgol bath and in a citric acid bath about 5 or 6 times - there was a lot of crud on there, and it took a while to get it off. Afterwards, things looked pretty good, and it was very easy to put back together.
espresso Gaggia Baby OPV valve disassembled
espresso Gaggia Baby OPV valve disassembled

When my machine re-assembly was complete, I hooked up my newly built pressure gauge, and proceeded to dial in the correct pressure. This is a bit complicated because the valve is not easily accessible, and adjustment requires disassembly of the valve. So its turn on machine, read pressure, turn off, unscrew valve, adjust (while not burning hands on hot boiler), reassemble, and repeat. It took 4 or 5 iterations to get it the way I wanted, I was moving about 1/2 turn of the adjustment nut each time. I think these come from the factory set very high, so I’m guessing you could improve your results just by loosening the nut a turn or two from factory tight. Espresso is now much easer to make (and much better tasting), and with the pressure gauge, I know any problems are my fault, and not the machine’s.

custom portafilter pressure gauge for espresso machineDetails of the pressure gauge: I had a friend weld a piece of stainless tubing to a blank filter basket (could probably get this done at a welding shop for $10 and a six pack as well), and attached to a tee, a needle valve, and a liquid-filled pressure gauge. I can adjust the flow to approximate espresso flow rates, and dial in the pressure from there.

No responses yet

Blood, Sweat, and Sledgehammers

Call us crazy, but this weekend we started on our third bathroom remodel (for those keeping count, that’s the third of three bathrooms in the house). It’s always fun when you can grab a three-pound hammer and go to town on the walls, but it does draw both blood and sweat (I sliced up my hands even with gloves on). Now that we’re seasoned pro’s when it comes to this stuff ;), things move pretty quickly, and I’d say we spent 6 or 7 hours total on the demo, and basically stripped the bathroom to walls and floor only.

In the weeks to come, we’ll be installing new plumbing (fixtures, etc), new tub, drywall/backer board, tile, new pedestal sink, wainscotting, etc. We’ll post photos and notes along the way, here are some pics of this weekend’s adventures.

No responses yet

Restoring my “new” Gaggia Baby espresso machine

I recently purchased an espresso machine to fuel my addiction - a Gaggia Baby circa mid 1990’s. You might wonder why I bought such an old machine, but it was a smoking deal - I got the machine and the grinder for a super-low price, and then sold the grinder on ebay to basically pay for both. So, it was worth it to put some time and a little money into making it like new again.Gaggia Baby espresso machine millenium

Gaggia home machines are pretty ubiquitous, as the internals have been the same for 20 years or so, with only cosmetic changes outside - so parts and instructions aren’t too difficult to find. My particular model is a “Baby”, which includes the 3-way valve and an adjustable OPV (over-pressure or pressure relief) valve, otherwise all models are basically the same. Being about 15 years old, it was showing some wear and tear, and was also showing that it hadn’t been cleaned in a LONG time. Before I noticed how much gunk was built up on it, I tried to pull a few shots - they all came out way too quickly, even with the grinder burrs basically touching.

So, I did what I usually do, and took the whole thing apart :). Gaggia machines are very easy to tear down, all it takes is a couple screwdrivers and allen wrenches. When you do take these machines apart, just be sure to label all the wires and take some photos to reference when re-assembling - a little masking tape and a sharpie can go a long way.

Once everything was apart, I started cleaning. The group (part the holds the portafilter) needed a ton of cleaning and scraping, there was years of coffee gunk in there. All parts got a few soaks in descaling solution and citric acid baths, there was quite a bit of scale on everything. It took about 5 soaks to get everything cleaned up, and a bit of scrubbing inside the boiler as well. I purchased a complete Gaggia rebuild kit on ebay from “supercoffeeman”, which includes all seals and gaskets needed to make the machine like new. For an older machine, its safe just to replace everything, for a newer machine all you may need to replace is the group gasket. In any case, if the rubber is brittle or cracked, its time to replace- mine certainly was. In subsequent posts, I’ll go over the details of the mods and adjustments I went through to get it dialed in pefectly…

No responses yet

Leopard’s Mail.app and IMAP Idle - never works quite right

I upgraded my home MacBook and work iMac to Leopard right when it came out. When I had Tiger, I installed an extention to Mail.app called “IMAP-IDLE”, which added support for the (logically named) IMAP Idle mode. This basically means that it will open an extra connection to your mail server, and when the mail server receives a new message, it notifies your client almost instantly. At work we have a Microsoft Exchange server, and for personal email I use gmail, and both were lightning fast - when I tested at work, I would see the new email in my inbox within a second of sending.

However, this behavior stopped when I upgraded to Leopard - it includes a built-in option to use IMAP IDLE, but it never seemed to work right - I would receive email only when I hit the “Get Mail” button, or my client checked on its specified interval.

I thought I had figured out how to make it work properly, it seems there are two settings that should impact this, but neither work well. Under Mail.app Preferences, under the Accounts Section, Advanced tab, if you select “Use IDLE command if the server supports it“, and you un-checkInclude when automatically checking for new mail“, things work ok for a while.  After making the change, restart Mail.app.  However, if something happens, i.e. you close the lid on your laptop, lose the connection to the server, etc., it no longer works.

Why can’t apple get this working as well as the plugin was before?  No good solution at this point…

One response so far

Win a free iMac at rakxzo.com!

My buddy Oscar recently started a contest, open to 14 - 19 year olds, to win a brand-new iMac. Contest details are available at the link below, but basically involve an original writing - research, news, opinion, etc. A great opportunity for those that qualify, and all you have to do is write! Check out the rules, and register, at:

http://rakxzo.com/giveaway

http://rakxzo.com/giveaway/contest-rules/

No responses yet

Automatic X11 forwarding with ssh

I use ssh on a daily basis for almost all my work (and at home, for managing my linux server), and occasionally have the need to run a X11 program. In that past I have been going through the pain of setting all the variables, on both the remote server and my local machine. I start up my X server, run xhost +ip.addr.ess, and on the remote server, set the DISPLAY variable. This does work fine if you’re on a routable network, but if not there’s a lot more trickery involved.

Finally I took the time to figure out the proper settings for forwarding X11 using ssh - they involve changing both your ssh client config, and the ssh server config, so you’ll need permissions for both ( or ask your friendly sysadmin).

On the server side, you need the following in sshd_config (/etc/ssh/sshd_config on Centos/RHEL/Fedora/etc):

X11Forwarding yes
X11DisplayOffset 10

The first line enables ssh forwarding, and the second sets the X11 display offset to start handing out to ssh clients (i.e. localhost:10).

On the client side, there is the option to change X11 forwarding settings in the global or local config file. I recommend changing settings locally, per server, as this will minimize your security risks - if a malicious user could get access to the display device, he could snoop on all your activity, keystrokes included.
Edit, and create if needed, ~/.ssh/config. Setup per-server entries for each server you want to enable forwarding to, like so:

Host 10.1.2.3
ForwardX11 yes
Host 10.1.2.4
ForwardX11 yes
ForwardX11Trusted yes

All you need is a Host entry, and ForwardX11 yes to get it working. With some applications (java), you will need to add the ForwardX11Trusted line as well, but don’t do so unless you are getting a blank box instead of your application. I needed this for my primary use of X11 forwarding, managing Veritas Netbackup.

No responses yet

Bathroom finished! Surfing! Boston!

Hi all - as usual, my blog pretty much serves as a place to alert people to new photos of mine. I’ve started using google’s picasaweb because, if you haven’t noticed, my site is horribly slow. I will have to wait until my contract is up, but in the meantime, I’d recommend against webhero.com.

That said, here’s some of the latest photos - our contractor finished our major bathroom remodel a while back, and I finally got around to putting up photos. Also included are some photos from my trip to boston, and some from the US open surfing competition. On the boston ones, make sure to click on the “View Map” button on top, I mapped each photo so you can follow my walk around the city.

Google Photo Gallery

One response so far

Done with our bathroom remodel - finally

This weekend we put the finishing touches on the bathroom we’ve been remodeling the past three or four months, so I’m happy to say its finished!. We re-did pretty much everything in the bathroom - tore it down to studs and concrete, and started building back up. It was a LOT of work, but we’re really proud of the results, and have a lot of confidence going into the next remodel (but not for a long while :) ).

Before:
the bathroom before

After:
After Remodel

Finished bathroom

No responses yet

Lots of new photos

I have posted a lot of new photos in the past couple months, take a look around the gallery.

Some photos I just took today of our bathroom remodel (they just finished tiling):
Remodel Photos
Photos from our trip to Seattle a couple weeks ago:
Seattle Photos

One response so far

New photo gallery

I setup a new photo gallery for my site, and I add photos to it all the time.

Check it out at: Ruizs.org Photo Gallery

The link is also on the right, under “Photos”.

No responses yet

Done unpacking

Well, that house is now really ours, and we love it!  Here are some new photos with our stuff in it, I’ll post a few more daytime shots as well soon.

House photos

No responses yet

New home in Huntington

We are currently in escrow for the purchase of a home in Huntington Beach :).  Everything is still in process, but we have our fingers crossed!  It is a 4 bedroom, 3 bath, has a pool & spa (and a huge master suite).  There’s a link to some photos below, enjoy!

HB Home Photos

No responses yet

Another holiday weekend - San Francisco

We flew up to Oakland this weekend to hang out with friends - stayed at Laura’s (Angie’s sister) place, and Joe and Beth flew down from Seattle. Teo lives down the street.

We saved monday to recover from the weekend, and we needed it.  We went to alcatraz, toured the city, hit a blues bar, saw a jazz show, went bar-hopping, went dancing, went wine tasting, bowling, and billiard-ing :).  It was a great weekend!

SF, Oakland, and Napa Valley Photos

No responses yet

Our Holiday Weekend

Quite a busy weekend, but a lot of fun and a nice break from working life.  Among other things, we: went to a Counting Crows concert, went to an exotic car show, watched some World Cup soccer, saw Superman Returns, went wine tasting, and watched some fireworks :).  Some photos:

Weekend photos 

No responses yet

Just another Ferrari

Angie and I are both car buffs, so we were surprised a while back to learn that there was a weekly exotic car meet, about 20 minutes from our house. The meet is every saturday, 7-9 AM, on PCH close to Crystal Cove state park. Every week about 100 - 200 cars are there to show, and many more people in attendence. You know you’ve seen some nice cars when you pass a Ferrari off as “not that special”. :)

Some photos: Exotic Car Meet

No responses yet

Next »