need… motivation

April 4th, 2011 by nebhead

A few months back I finally kicked off a new diet plan.  I hit that moment of clarity where I just said to myself, damn, I’m too fat.  This really has to stop.  It’s like the scales finally tipped (pun intended), as if my sloth-like apathy for any kind of food management had finally reached its apogee.  I had recently gone into my new doctor for an introductory appointment and was going through the list of things that were wrong with me.  That’s when the doctor oh-so-slyly added, “…and you know you are overweight, right?”  Crackle, crackle – Ding!  That’s the sound of the small dim light bulb in my head flickering on.  Yeah, it was well and truly time.

Because I can’t do anything too boring, I decided to try out something new.  One might even call it a fad.   Ok, it’s definitely a fad.  One might even call it daft.  I’m trying out the Slow-Carb diet (yeah, just google it).  Unless you’ve been living in a cave, under a rock, on another planet, etc., then you’ve probably heard of a low-Carb diet.  Well, this is similar, but instead of eating deliciously carby things like bread, sugar, fruits, beer, etc., you replace those things with lots and lots of beans.  Legumes.  Pinto, Black, Lentil, Refried, and so on.

Let me tell you, it’s easy to get tired of beans.  I mean, I love beans as much as the next guy, but try eating them all the time for a couple of months.  It gets pretty boring.  But it seems to be slowly but steadily working.  Though I haven’t seen the incredible results that some claim to get, I have seen much progress.  I’m down over 16 pounds since I’ve started this thing and I feel pretty darn great.

Now here is the shocker.  I have not exercised one tiny… little… bit.  I have maintained my sedentary existence, parked in front of a computer all day, barely lifting a mouse.  I even have a fancy gadget to lift the handset from my desk phone so that I can use my headset. Yes.  Shameful indeed.

With that said, I can accelerate my weight loss, and actually gain energy (so they say) if I just started exercising… even a tiny little bit every other day.  But I don’t.  Why?  I’m really not sure.  I think I need… just a bit of motivation.

I know I should get out of bed just a little early, throw on those running shoes and bag a mile tomorrow morning.  One measly mile.  But I consistently hit the snooze.  Sleep is too awesome to be squandered on some sweaty, heart-pounding, lung-stinging, morning run.

As you can see – I need some help here folks.  Motivate me.

installing subsonic on freenas (and bonus upgrade instructions)

February 2nd, 2011 by nebhead

I can’t recall if I’ve talked about FreeNAS before on this blog, but if I haven’t that may be a topic for another time.  Besides, lots of other folks have written about it in the past.  It’s great network storage for backing up all of our documents, photos, videos and music in one place with built in RAID backup.  It’s amazing.  And now with Subsonic, we have the option of installing software that can stream music (and now video) to any web browser or even smart phone on the internet.  Very cool.

Once again, I’m writing a really, really nerdy post as a public service to those out there who want to do the same and haven’t gotten enough guidance elsewhere on the internet.  Also this will serve as a persistent memory for my inevitable re-install later.  I’m sure most of my regular readers will want to stop reading at this point.

Before starting, it’s really important that you have enough space on your FreeNAS OS partition to hold Subsonic.  In the Subsonic forum it’s suggested that you carve out at least 150MB for all of the files.  I’d suggest allocating at least twice that if possible.  I’ve found that after a fair amount of use, the log file will start to grow pretty large, you may want to add codecs for transcoding, etc.  Personally this was the most painful part of the process since I had an “embedded” installation of FreeNAS on a USB flash drive which was fairly small.  During this process I used the capability within FreeNAS to backup the configuration before I re-installed.  Make sure when you re-install (if you need to) that do not choose the “embedded” option.  I installed from the CD-ROM image and chose the “full” install option onto a Hard Drive w/Data Partition (even though I will not actually use a hard drive or data partition).

The information and steps below are lovingly borrowed from the following two links, however I have mashed them up together, and added steps/made some changes that I found helpful during my experience installing the software.

  • Subsonic Forum: Sindre provided some helpful instructions to get your started on the install with FreeNAS.
  • Ozziks Blog: Huge thanks to this blog for helping with the finer points of the installation process.

Step 1: Prepare your server for the installation.

Before getting started, enable SSH access to your FreeNAS server.  You’ll find this under the web UI:  “Services >SSH”.  Set this to enable, and allow root.  You can log into your FreeNAS server by using any SSH terminal client.  Under Ubuntu (with SSH client installed) type “ssh x.x.x.x@root” (where the x.x.x.x is the IP address of your FreeNAS server).   If you have Windows use Putty.  Just remember that you must login as “root”, and not “admin”.

Setup FreeNAS’s Gateway IP.  This was something that I got hung up on for hours while trying to run the pkg_add command later in the process.  Well, maybe not hours, but it was an ah-ha moment when I finally stumbled upon the answer.  Under the FreeNAS web interface go to Network > LAN Management > Gateway = 192.168.1.1 (set this to your router’s IP address, mine happens to be 192.168.1.1).

Step 2: Download Java JRE (or JDK) package from:

http://www.freebsdfoundation.org/downloads/java.shtml

You should choose the JRE package according to your CPU architecture and FreeBSD version (if you have FreeNAS 0.7.x then you will want to download the FreeBSD 7 package, and of course based on your release, either AMD(64-bit) and i386(32-bit)).  I chose diablo-jre-freebsd7.i386.1.6.0.07.02.tbz, having FreeNas 0.7.2 and i386.  I then put this file onto my FreeNAS share drive so that you can access it directly from the shell (i.e. /mnt/share-name/path-to/file-name) later when you want to add the package.

Step 3: Install dependent packages (included the transcoders here as well, but may not be desired in your config):

$ pkg_add -v -r xtrans
$ pkg_add -v -r xproto
$ pkg_add -v -r xextproto
$ pkg_add -v -r javavmwrapper
$ pkg_add -v -r lame
$ pkg_add -v -r flac
$ pkg_add -v -r ffmpeg

UPDATE 1/10/2012:  If you run into issues with the latest versions of FreeNAS failing the pkg_add command like I did recently, the follow these instructions prior to the pkg_add commands.

Before installing the packages, if you are using FreeNAS 7.2 (based on FreeBSD 7.3), you’ll need to enter the following command:

setenv PACKAGESITE ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-7.3-release/Latest/

(substitute amd64 for i386 if 64-bit).

(May also work for other versions – if the version of FreeBSD is no longer considered the current release, the main mirror will no longer contain the package files, therefore the above is necessary to tell pkg_add where to find the .tbz files. You may set it permanently in ~/.cshrc if you wish it to remain sticky.)

If you have issues installing the lame codec you may also try the following.  I can’t recall if I ran into this issue or not.

$ pkg_add -r -v http://ftp.urc.ac.ru/pub/OS/FreeBSD/packages-7/Latest/lame.tbz

Step 4: Install the JRE (the .tbz file is the one you downloaded in step 2)

$ pkg_add -v /mnt/share-drive/diablo-jre-freebsd7.i386.1.6.0.07.02.tbz

Of course your version of the file and location may be different, so don’t copy/paste this portion.

Step 5: Download Subsonic standalone version and install it in /var/subsonic/standalone on your FreeNAS, as described here.  Just like with the Java package, I put the Subsonic Tarball on the share drive somewhere (i.e. In SSH:

$ mkdir /var/subsonic
$ mkdir /var/subsonic/standalone
$ cd /var/subsonic/standalone
$ tar xvzf /mnt/share-name/path-to/subsonic-x.x-standalone.tar.gz

Some folks suggest changing the permissions of all of the files at this point.  Technically it will probably work just fine untouched.  But if you want:

$ chmod 777 *.*

Step 6: Modify the subsonic.sh file.

/var/subsonic/standalone/subsonic.sh

If you are editing under Windows, do yourself a favor and save the file in ASCII format so as not to cause issues.  The fist time around I made changes in my Windows text editor and it introduced all kinds of invisible line breaks and null characters which caused the script to fail under BSD.   Just… don’t.

I also found an issue with the subsonic.h file, as shipped, under my FreeNAS implementation and am not quite sure why it doesn’t work.  It may work out of the box for you, but for some reason it was broken for me.  If you run into the same issue, you can make the following changes.

From:

cd $(dirname $0)
if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
cd $(dirname $(readlink $0))
fi

To:

cd /var/subsonic/standalone
#if [ -L $0 ] && ([ -e /bin/readlink ] || [ -e /usr/bin/readlink ]); then
#cd $(dirname $(readlink $0))
#fi

Step 7: Copy codecs into the Subsonic transcode directory:

mkdir /var/subsonic/transcode
cp /usr/local/bin/lame /var/subsonic/transcode/
cp /usr/local/bin/flac /var/subsonic/transcode/
cp /usr/local/bin/ffmpeg /var/subsonic/transcode/

There is one more step to get codecs to function properly that we’ll cover later.  If you installed some other codecs in step 3, then you’ll want to copy those to the transcode directory as well.

Step 7: In the FreeNAS web interface, go to System > Advanced > Command script and add the following “PostInit” script:

/var/subsonic/standalone/subsonic.sh

Step 8: Reboot FreeNAS, and go to http://<your-freenas-server>:4040 to start using Subsonic.

Step 9: Configure your transcoder settings.  In the Subsonic web interface go to “Settings > Transcoding”.

In this example, I’ve set up FLAC to transcode to WAV, then to MP3.   On the line reads “flac > mp3″ modify the following:

Step 1 = flac -c -s -d %s
Step 2 = lame -b 320 – -

NOTE: This hard-codes the bitrate to 320kbps, which is presumptuous.  But hey, that’s what FLAC is all about right?  High quality.

My FreeNAS server is an under-powered system (mostly because it never needed to be powerful), so transcoding FLAC to MP3 basically consumes 100% of the processor bandwidth.  Listening to FLAC’s is something I will probably do sparingly.  Your mileage may vary.

Summary: It looks hard, but I’ve made all the mistakes for you, so this guide should save you some serious time.  If you run into any issues, Google is always your friend.

And in closing, if you haven’t yet donated to the project, I urge you to do so.  Sindre (the developer of Subsonic) obviously put a lot of hard work into this and it is just flat-out great software.  He deserves a little scratch for bringing this to the masses for free.  So do your part and support the community.  It’s an investment in your personal enjoyment of music and an investment in the future development of this software.

BONUS:  How to UPDATE/UPGRADE your Subsonic to the latest version on FreeNAS

From time to time, Subsonic has bug fixes and/or feature additions that may be compelling enough to make you want to upgrade your installation.  I could not find a single shred of information on the internet about how to update the “standalone” version of Subsonic on FreeNAS without completely re-installing.  I did some experimenting and came up with the below solution.  This is not endorsed and certainly should be done at your own risk.  Back-up your Subsonic installation before you try this.

Step 1: Shutdown Subsonic.  In the FreeNAS web interface go to System > Advanced > Command script and then delete following “PostInit” script:

/var/subsonic/standalone/subsonic.sh

Reboot the system.  Subsonic will not automatically run on restart and it will be safe to make changes.

Step 2: Back up your Subsonic installation by copying all files under /var/subsonic to another safe location.  If you for some reason run into an issue during the install, you should be able to simply copy all of these files back and be back in business.

Step 3: Download the latest standalone package here.  Put the new tarball on my FreeNAS share drive so that you can access it via the terminal (i.e. under the /mnt/share-name/path-to/ directory)

Step 4: Unpack subsonic-x.x-standalone.tar.gz to “var/subsonic/standalone”.  Using SSH:

$ cd /var/subsonic/standalone
$ tar xvzf /mnt/share-drive/path-to/subsonic-x.x-standalone.tar.gz

This will unpack the new files right over the top of the old files.  Edit permissions on the new files if desired.

Step 5: Edit the subsonic.sh file as necessary.  (see step 6 above)

Step 6: In the FreeNAS web interface, go to System > Advanced > Command script and add the following “PostInit” script:

sh /var/subsonic/standalone/subsonic.sh

Step 7: Reboot FreeNAS, and go to http://<your-freenas-server>:4040, login and confirm your settings.

Step 8: Enjoy.

I would love to hear your successes or failures to make this tutorial just a bit more useful.  Feedback is always welcome.

brewing hack

January 30th, 2011 by nebhead

Many of you know that I picked up the hobby of brewing beer a couple of years back.  Well, my hobby has slowed down more recently, but I do still kick out 5-gallons of delicious craft beer occasionally.  One problem with brewing in California is the warm temperatures during the spring, summer, fall and well, winter months too.  Maintaining a good fermentation temperature is really tough when the interior of your house exceeds the ideal temperature range at 68-70 degrees Fahrenheit.  Temperature controlled fermenters are really, really expensive and there is no way I can justify the cost.  Until now.  Check out this ingenious hack that a friend of mine tipped me off to recently.  It’s beautifully simple and a tiny fraction of the cost of those expensive temperature controlled fermenters available elsewhere.  Cool.  Literally.

random photo day

January 26th, 2011 by nebhead

This was taken a few months ago… but still pretty adorable in my opinion.

dry spell

November 11th, 2010 by nebhead

This post will officially break my 8 month long dry spell for posting to this blog.  I should complain about how I’ve been too busy to write, or spending more time with the new kiddo to get online, and all of those other excuses.  But alas, they will all fall flat in cyberspace.  I need to make time to write here on this page or my mind will wither and my creativity with it.   I know I’ve said it before but I really want to start writing more regularly again.  It’s cathartic, healing and introspective.  All things that I think would be good for my soul.

Alright, that’s all you get for today.  Back to work.  Until next time.

claire’s parents are growing up so fast

March 3rd, 2010 by nebhead

This week is a big milestone for Claire.  She’s going to be going to daycare for the first time.  She’ll be thrust into an environment completely different from what she’s used to, with unfamiliar people.  It’s going to be really hard… for her parents.  And it’ll be hard on her too, I’m sure.  She won’t be in our protective cocoon for a large majority of the day.  She’ll be feeding from a bottle, she’ll be sleeping in different place, she’ll be interacting with different babies, the list goes on.  It’s a big milestone for us parents too.  We have to sort of let go of our little newborn baby and let her start to expand her independence.   It’s going to be tough letting other people take care of her for a good portion of the day, while we toil at work.  But I know we have to deal with it.  Sigh.  Our little girl is growing up so fast, and so are her parents.

blogging from the seoul

February 27th, 2010 by nebhead

Well folks, I’m off to Asia once again.  This time it’s Korea and Taiwan, in a whirlwind business trip.  I’m on the plane writing this, killing some time on the 12 hour flight, so you may actually get this post later in the week when I get a spare moment to post to the website.  I may even be back in the states by the time you are reading this.   A little blog post latency.    Let’s get on with it.

I’m away from my girls for the first time since Claire was born, which is a big milestone in itself.  I underestimated how much it would tug at the heartstrings to leave Suzy and Claire behind for this relatively short jaunt to Asia.  As I kissed Suzy and Claire goodbye, I held back the tears and tried to steady my voice as I told them I loved them and that I would be back in a week.  Just a few weeks earlier, I didn’t quite think I’d be this emotional, but as the moment drew near I thought about all of the missed evenings with Claire and dinners with Suzy.  And don’t tell Suzy this, but I even will miss changing diapers in the middle of the night.   Sigh.  I do love my girls so much.  To make matters worse, all of the movies on the flight over to Korea were “themed” tear-jerkers.  Great.  Stupidly, I sat and watched these movies, descending further into my pit of despair.

Before leaving the house for the airport, Suzy, Claire and I did some last minute testing of Skype.  I was unsure about the microphone setup with Linux, and so I attempted to switch to Suzy’s laptop instead.  I’m not sure why I ever doubted setting it up on Linux, because it seems to be working just fine, whereas on her Windows XP laptop we can’t seem to get the video working correctly.  Chalk one up to Ubuntu.  The real test will come when we finally are able to get a real video-call going.  Unfortunately, they’ll either have to be super-late calls (after midnight here), to catch her early in the morning.  Or they’ll have to be early morning for me (late afternoon for Suzy).  I still find it pretty darned amazing that we will be able to see each other and talk in real time all the way on the other side of the globe (just about).  It’ll be nice to start the day here with a little reminder of home to take the edge off .

My live view of Suzy and Claire from Asia.

UPDATE: And yes, I posted this after returning from the continent.  Too busy to actually post in Asia…

another catchup gallery

February 7th, 2010 by nebhead

I tend to post updates here on this blog in a flurry, when I have a free moment to steal away from the madness.  When I’m not working, I’m here at home, either working (sadly) or bouncing Claire or taking care of a random chore while Suzy bounces Claire.  Well, today, I grabbed a few moments to finish posting pictures from Christmas in Oregon in 2009.  Dang.  That only took a month.

sleep smiling

January 19th, 2010 by nebhead

Claire has developed a sleep smiling habit.  This was footage taken right after we got back from our trip to Oregon. What’s she dreaming about? A bouncing Winnebago? Probably not. If you’re really observant, you might be able to see her laughing too.

domo kun claire

January 14th, 2010 by nebhead

For those of you who aren’t up on the BookFace, you may have missed my adorable shot of Claire test driving the Domo Kun pacifier.  I’ve posted it here to preserve it forever and for all to see.  My good ex-patriot friends Pat and Cynthia who now reside in Taipei, Taiwan picked this up in their worldly travels just for Claire.  It’s awesomeness is quite overwhelming.