Monday, March 13, 2006

Virtual Desktops on Windows

I love multiple virtual desktops. I have to work on windoze sometimes at work, which doesn’t have virtual desktops, but I found Virtual Dimension, and it rocks!

Posted by Bryan on March 13, 2006

Sunday, March 12, 2006

Knee-Deep at Alta

Part way through the day on Friday, I realized I was skiing down
the hill and the only sound I could hear was the squeaking of my
boots. I couldn’t hear other people, I couldn’t hear my edges
scraping across ice—basically all I could hear was the silence of
fine, dry, knee-deep Utah powder. It was turning out to be one
awesome day of skiing at Alta. I
have the difficult assignment of interviewing internship candidates at
BYU for my company, so once or twice a year they fly me down to Utah
to meet with the hopefulls. As I’ve done before, I decided to take an
extra day for myself after the interviews and go skiing. My sister,
Julie, skied with me and we had a blast.

My interviews were Thursday and it snowed most of the day. Friday
was the ski day. There was about 6 inches of powder, and a relatively
small crowd at the hill. The soft snow was very forgiving on the
steeps, and I felt like I was skiing better than I ever had in my
life. If I hadn’t bought some sunscreen at lunch I might have had the
worst sunburn of my life too. It was that nice out. I forgot about
the terrible traffic that we’d had on the way up pretty quickly (two
accidents!). The way home was slow going too, but that was OK,
memories of ripping down the hill were very comforting.

(Sorry, neither of us remembered a camera, so no pictures)

Posted by Bryan on March 12, 2006

Saturday, March 11, 2006

Root Partition Full

If you’ve tried to access the website in the past few days you haven’t been able to. I’m sorry. This will be way too much information for many of you, but so I don’t forget I’ll write down just what happened and how I fixed it. For the less interested, just know that I’m on top of it, and that the system is back up. Yay!

Here is the sequence of events that lead to this, as far as I can re-create them. First, I don’t remember how long ago, but I installed Mandriva Linux on this machine. I probably had it automatically partition the hard drive, probably for a desktop setup. This created a root partition and a /home partition. It made the root partition about 6 GB, and all the rest of the hard drive went for /home. I put a second network card in the machine and set it up as a router for my home network. I configured samba to serve files on the network card that the home network was on, eth0. Since then I have installed the postgresql database, which by default keeps all its data in /var/lib. Also, a goodly amount of log files have accumulated. I don’t know how much space this was all using before, but I made a change that started using a whole lot more recently, and not on purpose. I bought a linksys router, so I disabled eth0 on this machine. This caused samba, actually nmbd, to write lots of error messages to about 4 or 5 different log files: /var/log/messages, /var/log/syslog, /var/log/daemons/warnings, /var/log/daemons/errors, and I think /var/log/mail/warnings too, all saying it couldn’t find eth0. All of these log files had grown into the hundreds of megabytes range in size. Finally, Ily saw the whole machine crash when she tried to open a rather large attachment in gmail. Firefox probably saved it to /tmp, which became the straw that broke the camel’s back. Of course this happened shortly after I left town for a few days, hence it didn’t get fixed until today. Ahh computers, you gotta love 'em. At least with Linux it’s easy to figure exactly what when wrong like this.

Needless to say, I reconfigured samba, deleted some log files, and for good measure I removed a whole bunch of cached rpms. My root partition has 2 GB free now. I hope that lasts until I can figure out how to non-destructively resize ext3 partitions!

Posted by Bryan on March 11, 2006

Thursday, February 23, 2006

Winter Weekend Continued

Sorry I’m late in posting this. After gushing to Ily about how much fun Isaac and I had on that beautiful day of skiing, I decided to take her and Micah up there two days later on Presidents day. The sky wasn’t as clear but it was much warmer and still very fun. We stopped at frozen Multnomah Falls for a bit, and then continued up to Cooper Spur. There wasn’t anything Micah could do there, so we continued on Highway 35 to Little John Sno Park for some sledding. The boys loved sitting on the sled between our legs, and Ily surprised me by being so willing to hike up the sledding hill over and over. So that was Saturday and Monday of last weekend that Isaac and I spent out in the snow. It was so much better than watching it rain from indoors!

Pictures and movies, of course

Posted by Bryan on February 23, 2006

Sunday, February 19, 2006

Isaac's First Ski Trip

Isaac and I went skiing yesterday at href=“http://www.cooperspur.com/”>Cooper Spur. It was fabulous.
The conditions were the most perfect that I think I have ever seen. A
bitter arctic wind has swept the sky completely clear of clouds and
haze the past few days, and dropped the temperature down into the
teens. The wind was still blowing hard in The Gorge as we drove east
on I-84, which made me nervous about the day ahead, but with Mt. Hood
looming large in front of us our van climbed highway 35 from Hood
River and the wind quickly became calm. At the resort the blazing sun
made 18 degrees feel like 40, and the snow was a fine dry powder. It
was a shades day for sure.

Cooper Spur is the perfect resort for a kid to learn how to ski.
Kids under 7 ski free (or was it 6?), so I only had to pay for my lift
ticket and Isaac’s rentals, which were incredibly cheap. There is a
single double chairlift and a rope tow that cover a whopping 50 acres
of terrain (the big resorts in Utah cover thousands of acres). Kids
music played from the speakers on the tiny little patio at the
miniature lodge, and the rental shop dude told Isaac how “awesome” his
little skis were, cementing Isaac’s early enthusiasm for this
tremendous sport.

I struggled teaching Isaac at first. He proved to be a more
difficult student than Ily and other friends my age I’ve taught.
After a bit of, um, harsh words between us, Isaac wisely called for a
snack break at 10:30. He sat in the sun on the patio while I went to
retrieve the grub from the van. On the way back I stopped at the
ticket/rental office and paid for a group lesson for him. After
apologetically telling Isaac what a horrible teacher I was he became
pretty excited for ski school.

The class was a success, after an hour he was riding the rope tow
and snow plowing down the short bunny hill all by himself. We rode
the inner tubes a bit, broke for lunch, and he was ready for the
chairlift. At least, that’s what he told me. Isaac fearlessly rode
to the top, and even though it took about an hour, and some serious
effort on my part to keep him from giving up and sliding down the hill
on his bum, he made it all the way down. I knew it was a success when
at the bottom he didn’t head straight for the car like he’d
threatened, but for the rope tow to reassure himself that even though
the big hill gave him trouble, he was still master of the bunny hill.
A little more tubing and it was time to head home, with Isaac asking
when we could do it again. Cooper Spur hasn’t seen the last of the
Murdocks.

Be sure and check out the href=”/gallery/isaacs-first-ski-trip”>pictures and video!

Posted by Bryan on February 19, 2006

Sunday, February 12, 2006

Category Specific Feed

The RSS link (that puts the orange icon in the url bar of Firefox) is now category specific. It used to just link to the feed for all categories, no matter where on the site you were. Now, for example, if you are on the Geek topic it links to the Geek feed, or if you are on the About This Site topic, it links to the About This Site feed. Django makes this stuff so easy, I love it!

Posted by Bryan on February 12, 2006

RSS Explanation

I found a better explanation of what rss is, and how to use it. It’s long, but thorough and helpful.

Posted by Bryan on February 12, 2006

Monday, February 6, 2006

And The Rain From Heaven Was Restrained

It may not last long, but the rain finally has taken a break! It’s amazing how many people were outside today, walking dogs, playing at the park, and riding their bikes. Vancouver is beautiful when the rain stops (and it drives you nuts when it hasn’t stopped for months!). It was good to go outside and see our yard again. I wasn’t too surprised to see the moss is winning the fight against the grass. Our fence is broken in two places from the rotting wood and the wind. Besides that it looks really good though. It sure is green.

Posted by Bryan on February 6, 2006

Swap ctrl and caps

I really like having the Ctrl and Caps Lock keys swapped on my keyboard. It makes using emacs just that much better. In the past, on my Linux boxes, I’ve had to write a little xmodmap script to do it. I just learned that Gnome now has an option to do this in the Keyboard Preferences dialog under Layout Options, Control Key Position. Sweet. And who says Gnome isn’t for power users?

For windoze I usually find a regedit script with google, such as this one.

Posted by Bryan on February 6, 2006

Sunday, February 5, 2006

Handy Online Scriptures

I taught a lesson on scripture study today, and in preparing I did some searching at lds.org for material. I also rediscovered The Church’s online scriptures. The search function is really handy. You can type in a reference, such as Alma 7:11, and it give you a link that you can click to bring up that scripture, highlighted. Type in a word like, faith, and it brings up 368 results for you. In sunday school today it was mentioned that Noah was Gabriel. “Is that in the scriptures anywhere?” our teacher asked. “It’s in the Doctrine and Covenants,” a class member assured him. Well, actually, if you search for “noah gabriel“ it apparently isn’t. Expand your search to include scriptures and study helps however, and you find 5 results that explain that Joseph Smith did teach that Noah and Gabriel are one and the same. Cool stuff.

UPDATE: Apparently they have made some updates and changed their links a bit. I’ve tried to update them above, but the Noah Gabriel demo doesn’t quite work the same anymore—I can’t get it to not search the study helps, but you can see that none of the results are in the scriptures. Oh well, cool to see they are constantly improving this!

Posted by Bryan on February 5, 2006

Thursday, February 2, 2006

Subversion Setup

How I set up subversion repositories on my Linux box. I got most of
this form the subversion
book
. I’ll try to link to the specific parts of the book where
each part came from.

First, href=“http://svnbook.red-bean.com/en/1.1/ch05s02.html”>create the
repository using fsfs for the database, because I heard it’s way
cooler than Berkeley db. Seriously (no really, I wish I had a better
reason, I read something that I found on Google somewhere that it
was).

svnadmin create --fs-type fsfs /path/to/repos/project

Next, set up the project directory tree to be imported. I’m using
what seems to be the standard setup with trunk, branches, and tags
sub-directories, as somewhat explained in the href=“http://svnbook.red-bean.com/en/1.1/ch04s02.html”>section on
using branches in the svn book.

mkdir project
mkdir project/tags project/branches project/trunk
cp -r /path/to/work/in/progress/* project/trunk/

Lately it’s a python project I’m putting into subversion so I
remove the .pyc files, they don’t go under revision control so one
more step:

find project/ -name "*.pyc" | xargs rm

Now import it:

svn import project file:///path/to/repos/project -m "initial import"

See that it worked:

svn list file:///path/to/repos/project

To really make sure it worked, href=“http://svnbook.red-bean.com/en/1.1/ch03s04.html”>check out
the project somewhere else:

cd /tmp
svn checkout file:///path/to/repos/project/trunk project

And that’s it, as long as you only want local access. I’ve set up
network access through Apache and I need to write that up too (before
I totally forget).

UPDATE: I finally wrote up how to setup subversion over httpd.

Posted by Bryan on February 2, 2006

Monday, January 30, 2006

It's A Boy!

ultrasound profile picture

In case you hadn’t heard, Ily is pregnant and due on June 29th. We had The Ultrasound today, and the anatomy was clear, it’s a boy. Isaac has declared that we will name him Jacques. We’re not so sure, but it sounds like a good fetal nickname to us. The full reality of having three little boys running and wrestling around the house is still sinking in. It should be fun, right? :-)

Click on over to the photo album to see Jacques’ first baby pictures.

Posted by Bryan on January 30, 2006

Sunday, January 29, 2006

Website Updates

It’s been a long time, but I’ve rewritten this website to make it a whole lot easier to update and maintain. I’ve added new features, like different news topics, the ability for you to comment on news items, and news feeds (The BBC explains these pretty well actually). I’ve been feeling like I should write more stuff down, so maybe this will help.

Saturday, January 28, 2006

How to Build a Django Powered Blog

I just about started using Wordpress, but I’ve been really
intrigued by this Django
thing, so I decided I’d rather mess around with it than Wordpress and
it’s PHP-ness. Roughly, this is what you need to do to build this
site:

Install Django

django-admin.py startproject yourproject

add admin to your installed apps in settings.py

python manage.py install admin
python manage.py createsuperuser
svn co http://code.djangoproject.com/svn/djangoproject.com/

copy the blog app from the djangoproject.com project
to your project’s apps directory

add a categories class to models/blog.py

move blog/urls/blog.py to blog/urls.py, rm -rf blog/urls/

add it to your installed apps in settings.py

Add this to your urls:

(r'^', include('murdockfamily.apps.blog.urls')),

Edit the first url in blog/urls.py so the slug regexp
is [\w-]+ instead of just \w+ (by accident I
discovered that the slug field accepts the '-' character,
but the regexp for the slug urls didn’t.

python manage.py install blog

break copyright law:

copy the blog templates from djangoproject.com to yourproject/apps/templates/blog

cp djangoproject.com/django_website/templates/base_weblog.html yourproject/apps/templates/blog

in yourproject/apps/templates/blog:

perl -pi -e 's|(extends )"(base_weblog)"|\1"blog/\2"|' *.html
cp djangoproject.com/django_website/templates/base_2col.html yourproject/apps/templates/blog
perl -pi -e 's|(extends )"(base_2col)"|\1"blog/\2"|' *.html
cp djangoproject.com/django_website/templates/base.html yourproject/apps/templates/blog
perl -pi -e 's|(extends )"(base)"|\1"blog/\2"|' *.html

add django.contrib.comments to your installed apps

add comments urls and comments_info_dict to your urls

copy comments templates to yourproject/apps/blog/templates/comments/

do the above “base” search and replaces again

in the templates dir, do this:

find . -name "*.html" | xargs perl -pi -e 's|weblog/||'

also, remove "weblog/" from the get_absolute_url method in the blog.py model

python manage.py install comments

feeds:

copy from main.py:

from django.contrib.comments.feeds import LatestFreeCommentsFeed
from django_website.apps.blog.feeds import WeblogEntryFeed

to your urls.py, change django_website to yourproject

rename stuff inside blog/feeds.py

add the rss url from main.py

add the feeds dict

kill the community line from the feeds dict

Something is still not working…oh comments rss sort of works, has
example.com in there a lot. Fix this later.

python manage.py runserver

go to http://127.0.0.1:8000/admin and add an entry

go to http://127.0.0.1:8000/

(change the templates before going live with this)

Still Todo:

Further enhancements (oh the fun could never end):

create templates for feeds for all posts and comments so description contains the full text

create feeds for each category

aggregate photo album in some cool way

a url and email field for comments, like wordpress does

ping all the cool blogging sites, like wordpress does

ability to write posts in emacs

format posts with one of those markup languages django seems to include

pingbacks or trackbacks or whatever