Archive for September, 2008

Trac 0.11 Auto-Install on DreamHost

Update: I’ve released an updated version of AutoTracOnDreamHost.

Trac 0.11 is out. And it’s awesome – both the usability in enhancements in 0.11 and Trac in general. Trac is one of those tools in my toolbox I use to up my productivity a few notches. For small projects, it’s a nice convenient time saver. For large projects, having the project management tools trac provides makes an astonishing difference in group productivity and allows for a significantly higher quality final product.

On my web host, DreamHost, Trac is non-trivial to install… until now! I’ve written a set of scripts that make it semi-trivial to set Trac 0.11 up on DreamHost. Original inspiration came from the ‘auto-install‘ on the DreamHost wiki, which is great that it’s there, but it was awkward for my configuration and, IMHO, suffers from backward compatibility and feature bloat issues.  So, I wrote up some scripts that work well with my configuration. The README explains how to use them.

You may also want to check out the dreamy-trac project. Both that code and these scripts were originally based off the same code on the DreamHost wiki, so you’ll see similarities. They both get you to a similar end result. I know in these scripts I’ve emphasized simplicity as much as possible at the expense of installing any extra plugins, or customization, or whatnot.

If there’s a fair amount of traffic coming here and it looks like people are using these, I’ll set them up on a public repository for easier access and collaboration. In the meantime, keeping it simple… here they are.

README:

# AutoTracOnDreamHost: README
# Released under GLPv3. http://www.gnu.org/licenses/gpl-3.0.html
# Copyright 2008 Michael Fogel. http://fogel.ca

#################### LICENSE #####################

AutoTracOnDreamHost is free software: you can redistribute
it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, either
version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

http://www.gnu.org/licenses/gpl-3.0.html

#################### HowTo #######################

Preliminaries:

  1. Assuming you're going to use this with SVN, you need to already
     have an SVN repository setup and running.  The webserver needs
     to have at least read permissions to the repository.

  2. You need to have a complete domain/subdomain set up to use
     with trac or a subdirectory of an existing domain.

  3. A MySQL database ready to use with trac.  This doesn't have to
     be it's own database, but AFAIK, there is no good reason not
     to give each trac site it's own database.

Do once: 

  1. Edit the configure.inc:

     - you probably want the latest and greatest of Trac, Genshi,
       MySQLDB, and Pygments.  Minor version releases of these
       shouldn't break this script.

     - alter the trac directory structure to your liking, or just
       run with my setup.

  2. Run the backend.sh.  This will set up all the parts of trac that
     are shared between all your trac sites (even if you have only one).

Do once per trac site:

  1. Run the site.sh.  This script will query you for details about
     the configuration of your database, your directory structure,
     svn repository, an admin trac user etc.

  2. Test it! Go to your new trac url and log in, browse the svn
     repository, create a dummy ticket etc.

#################### Help Me! ####################

I'll post about any major updates or known bugs on my blog.
http://blog.fogel.ca  In event of enough interest in these
scripts, I'll set up a public repository for it so we can
all contribute.

If you find any major bugs or want to submit a patch, you can
email me which is my first name (mike) at my domain (fogel.ca).
Requests for personalized help will be answered in the limit
of infinite free time, which I don't have, so no promises.

Elsewise, the best conglomeration of information about Trac
on DreamHost AFAIK is currently at on the DreamHost wiki.

http://wiki.dreamhost.com/Trac

##################################################

configure.inc:

# AutoTracOnDreamHost: configure.inc
# Released under GLPv3. http://www.gnu.org/licenses/gpl-3.0.html
# Copyright 2008 Michael Fogel. http://fogel.ca

# Abort on any errors
set -e

TRAC_VERS=0.11.1
GENSHI_VERS=0.5.1
MYSQLDB_VERS=1.2.2
PYGMENTS_VERS=0.11.1

# trac dir structure
TRAC_ROOT="${HOME}/trac"
PKG=${TRAC_ROOT}/packages
EGG=${TRAC_ROOT}/egg_cache
INSTALL=${TRAC_ROOT}/install
SITES=${TRAC_ROOT}/sites
SVN=${HOME}/svn
TRAC_SITE_PACKAGES=${PKG}/lib/python2.3/site-packages
TRAC_HTDOCS=${TRAC_SITE_PACKAGES}/Trac-${TRAC_VERS}-py2.3.egg/trac/htdocs

EXP_CMD1="export PYTHONPATH=$TRAC_SITE_PACKAGES"
EXP_CMD2="export PYTHON_EGG_CACHE=$EGG"
EXP_CMD3="export LD_LIBRARY_PATH=$PKG/lib"
EXP_CMD4="export PATH=$PKG/bin:\$PATH"

cat <<OutputDreamTracInstallReminder

==== Put the following in your ~/.bash_profile ====
Where trac/packages=PKG
$EXP_CMD1
$EXP_CMD2
$EXP_CMD3
$EXP_CMD4
===================================================

OutputDreamTracInstallReminder

# modify those env vars for the duration of this script too.
$EXP_CMD1
$EXP_CMD2
$EXP_CMD3
if [[ "$PATH" != *"$PKG/bin"* ]]; then export PATH=$PKG/bin:$PATH; fi

# Update version information here and DIRs below.

TRAC=http://ftp.edgewall.com/pub/trac/Trac-${TRAC_VERS}.tar.gz
GENSHI=http://ftp.edgewall.com/pub/genshi/Genshi-${GENSHI_VERS}.tar.gz
SETUPTOOLS=http://peak.telecommunity.com/dist/ez_setup.py
MYSQLDB=http://switch.dl.sourceforge.net/sourceforge/mysql-python/MySQL-python-${MYSQLDB_VERS}.tar.gz
PYGMENTS=http://pypi.python.org/packages/source/P/Pygments/Pygments-${PYGMENTS_VERS}.tar.gz

TRACDIR=Trac-${TRAC_VERS}
GENSHIDIR=Genshi-${GENSHI_VERS}
MYSQLDBDIR=MySQL-python-${MYSQLDB_VERS}
PYGMENTSDIR=Pygments-${PYGMENTS_VERS}

#### function getInupt - used primarily in site.sh #####
# arg 1: message
# arg 2: initial value
function getInput {
	MES="$1"
	eval "VAL=\$$2"
	echo ""
	echo "Press enter to accept the current value, or input a new value."
	TMP="$VAL"
	while [[ -n "$TMP" ]]; do
		VAL="$TMP"
		echo "$MES: $VAL"
		read TMP
	done
	echo "Using $MES: $VAL"
	eval "$2=\"$VAL\""
}

backend.sh:

# AutoTracOnDreamHost: backend.sh
# Released under GLPv3. http://www.gnu.org/licenses/gpl-3.0.html
# Copyright 2008 Michael Fogel. http://fogel.ca

source ./configure.inc

echo -e "\n==== Creating need dir structure ===="
[ ! -d ${PKG} ] && mkdir -p ${PKG}
# the egg_cache dir must be writable by your apache cgi/python user
[ ! -d ${EGG} ] && mkdir -p ${EGG} && chmod 770 ${EGG}
[ ! -d ${INSTALL} ] && mkdir -p ${INSTALL}
[ ! -d ${SITES} ] && mkdir -p ${SITES}

echo -e "\n==== Retrieving installation files ===="
cd ${INSTALL}
[ ! -f ${TRACDIR}.tar.gz ] && wget ${TRAC}
[ ! -f ${GENSHIDIR}.tar.gz ] && wget ${GENSHI}
[ ! -f ${MYSQLDBDIR}.tar.gz ] && wget ${MYSQLDB}
[ ! -f ${PYGMENTSDIR}.tar.gz ] && wget ${PYGMENTS}
[ ! -f ez_setup.py ] && wget ${SETUPTOOLS}

echo -e "\n==== Installing Setup Tools ===="
#Create site-packages directory. Script will fail without it.
mkdir -p ${TRAC_SITE_PACKAGES}
[ -z `which easy_install` ] && cd ${INSTALL} && python ez_setup.py --prefix=${PKG}

echo -e "\n==== Installing Pygments ===="
cd ${INSTALL} && tar xzf ${PYGMENTSDIR}.tar.gz
cd ${PYGMENTSDIR} && python setup.py install --prefix=${PKG}

echo -e "\n==== Installing MYSQLdb ===="
cd ${INSTALL} && tar xzf ${MYSQLDBDIR}.tar.gz
cd ${MYSQLDBDIR} && python setup.py install --prefix=${PKG}

echo -e "\n==== Installing Genshi ===="
cd ${INSTALL} && tar xzf ${GENSHIDIR}.tar.gz
cd ${GENSHIDIR} && python setup.py install --prefix=${PKG}

echo -e "\n==== Installing Trac ===="
cd ${INSTALL} && tar xzf ${TRACDIR}.tar.gz
cd ${TRACDIR} && python setup.py install --prefix=${PKG}
mkdir -p ${PKG}/share/trac
cp -fr ${INSTALL}/${TRACDIR}/cgi-bin ${PKG}/share/trac

echo -e "\n==== Setting permissions for Trac htdocs ===="
DIR=${TRAC_HTDOCS}
while [ "$DIR" != "$HOME" ]; do
	chmod o+x $DIR
	DIR=`dirname $DIR`
done
find ${TRAC_HTDOCS} -type d -exec chmod 751 {} \;
find ${TRAC_HTDOCS} -type f -exec chmod 644 {} \;

echo -e "\n==== Backend install complete ===="

site.sh:

# AutoTracOnDreamHost: site.sh
# Released under GLPv3. http://www.gnu.org/licenses/gpl-3.0.html
# Copyright 2008 Michael Fogel. http://fogel.ca

source ./configure.inc

# Defaults
PROJECT=somesvnproject
DOMAIN=trac.somedomain.com
DOMAINDIR=${HOME}/http/$DOMAIN  # default refreshed after sampling DOMAIN
TRACPATH=/trac
MYSQLHOST=mysql.$DOMAIN         # default refreshed after sampling DOMAIN
MYSQLUSER=trac_username
MYSQLPASSWD=trac_password
MYSQLDBNAME=trac_$PROJECT       # default refreshed after sampling PROJECT
TRAC_USER=admin
TRAC_PASSWORD=password

# Prompt on those defaults
getInput "Subversion Project ID"                 PROJECT
getInput "Domain for Trac"                       DOMAIN
DOMAINDIR=${HOME}/http/$DOMAIN
MYSQLHOST=mysql.$DOMAIN
getInput "Path for domain root"                  DOMAINDIR
getInput "Path for Trac relative to domain root" TRACPATH
getInput "MySQL hostname"                        MYSQLHOST
getInput "MySQL username"                        MYSQLUSER
getInput "MySQL password"                        MYSQLPASSWD
MYSQLDBNAME=trac_$PROJECT
getInput "MySQL DB name"                         MYSQLDBNAME
getInput "Trac Admin username"                   TRAC_USER
getInput "Trac Admin password"                   TRAC_PASSWORD

# using these values
echo "PROJECT:${PROJECT}"
echo "DOMAIN:${DOMAIN}"
echo "DOMAINDIR:${DOMAINDIR}"
echo "TRACPATH:${TRACPATH}"
echo "MYSQLHOST:${MYSQLHOST}"
echo "MYSQLUSER:${MYSQLUSER}"
echo "MYSQLPASSWD:${MYSQLPASSWD}"
echo "MYSQLDBNAME:${MYSQLDBNAME}"
echo "TRAC_USER:${TRAC_USER}"
echo "TRAC_PASSWORD:${TRAC_PASSWORD}"

# Vars for this site
WEBDIR=${DOMAINDIR}/${TRACPATH}
INDEX_CGI=${WEBDIR}/index.cgi
TRACINI=${SITES}/${PROJECT}/conf/trac.ini
HTACCESS=${WEBDIR}/.htaccess
HTPASSWD=${WEBDIR}/.htpasswd
NAME="Trac: ${DOMAIN}${TRACPATH}/"

echo "Setup site"
if [ ! -d ${SITES}/${PROJECT} ]; then

	#Setup Trac Environment for MySQL
	${PKG}/bin/trac-admin ${SITES}/${PROJECT} \
		initenv ${PROJECT} \
		"mysql://${MYSQLUSER}:${MYSQLPASSWD}@${MYSQLHOST}/${MYSQLDBNAME}" \
		svn \
		${SVN}/${PROJECT};

	# set admin user to premissions
	${PKG}/bin/trac-admin ${SITES}/${PROJECT} \
	permission add $TRAC_USER TRAC_ADMIN
fi

echo "Make Trac Web Accessible"
# Make Trac Web Accessible
mkdir -p ${WEBDIR}
chmod 751 ${WEBDIR}

if [ -f "${INDEX_CGI}" ]; then
	rm ${INDEX_CGI}
fi
echo "#!/bin/bash" >> ${INDEX_CGI}
echo "export HOME=\"/home/${USER}\"" >> ${INDEX_CGI}
echo "export TRAC_ENV=\"$SITES/${PROJECT}\"" >> ${INDEX_CGI}
echo "$EXP_CMD1" >> ${INDEX_CGI}
echo "$EXP_CMD2" >> ${INDEX_CGI}
echo "$EXP_CMD3" >> ${INDEX_CGI}
echo "$EXP_CMD4" >> ${INDEX_CGI}
echo "exec $PKG/share/trac/cgi-bin/trac.cgi" >> ${INDEX_CGI}
chmod 755 ${INDEX_CGI}

# logo in trac.ini
sed -i "s/^alt = .*$/alt = trac_banner.png/" ${TRACINI}
# some fancy sed to escape forward slashes... simplier patches are welcome.
TRACPATH_S=`echo ${TRACPATH} | sed -e "s/\/$//" -e "s/\//\\\\\\ \//g" -e "s/ \//\//g"`
sed -i "s/^src = .*$/src = ${TRACPATH_S}\/chrome\/common\/trac_banner.png/" ${TRACINI}

#Pretty URLs
mkdir -p ${WEBDIR}/chrome
chmod 751 ${WEBDIR}/chrome
ln -sf ${TRAC_HTDOCS} ${WEBDIR}/chrome/common

# .htaccess fun
if [ -f ${HTACCESS} ]; then
	rm ${HTACCESS}
fi

touch ${HTACCESS}
chmod 644 ${HTACCESS}

echo "AuthType Basic" >> ${HTACCESS}
echo "AuthUserFile ${HTPASSWD}" >> ${HTACCESS}
echo "AuthName '${NAME}'" >> ${HTACCESS}
echo "require valid-user" >> ${HTACCESS}
echo "" >> ${HTACCESS}
echo "DirectoryIndex index.cgi" >> ${HTACCESS}
echo "Options ExecCGI FollowSymLinks" >> ${HTACCESS}
echo "" >> ${HTACCESS}
echo "" >> ${HTACCESS}
echo "RewriteEngine On" >> ${HTACCESS}
echo "RewriteCond %{REQUEST_FILENAME} !-f" >> ${HTACCESS}
echo "RewriteCond %{REQUEST_FILENAME} !-d" >> ${HTACCESS}
echo "RewriteRule ^(.*)\$ ${TRACPATH}/index.cgi/\$1 [L]" >> ${HTACCESS}
echo "" >> ${HTACCESS}

#Create .htpasswd file for trac admin with password
htpasswd -bc ${HTPASSWD} $TRAC_USER "$TRAC_PASSWORD"

# Note: on DreamHost you avoid a world-readable htpasswd file by
# setting one up via panel.dreamhost.com->Goodies->Htaccess/WebDAV.
# This will make htpasswd and htaccess files (overwriting anything
# that's there) that has group dhapache, is group readable, and
# the apache user is in the dhapache group.  Baring this, you need
# to make your htpasswd file word-readable (or email support for
# some chgrp action as root)
chmod 644 ${HTPASSWD}

echo ---------- SITE INSTALL COMPLETE! ----------

Comments (13)

Travels with an Eee PC

I just got back from three weeks of traveling across Europe – about half bike touring across Iceland and Holland, the other half more normal hostel-hoping via train/plane/bus/boat.

I brought a friend with me:

friendz with the eee pc

Wallet included in the picture to give you a sense of scale… it’s fricking tiny!  It weighs about as much as the ‘Europe on a Shoestring’ Lonely Planet guide.

I am soooooooo glad I brought a mini-laptop with me.  Not only did it allow me to do stuff like:

  • buy a cheap flight to Berlin from Reykjavík at the last minute.
  • organize a 24 hour sprint from Amsterdam to Dublin involving two ferries, three trains, three bike connections – at rock-bottom price.
  • stay in touch.  blog.

It also kept me sane when I got locked down in southern Iceland in a storm for three days during the bike tour part.

So, I really can’t recommend the idea of bringing a mini-laptop with you for traveling enough.  It really made a huge difference in my whole experience… then again I am one of those people who the internet is my ‘comfort food’.  Some people need chocolate or cheetos to feel good.  Others need to watch that special show to fall asleep at night.  I need my internet fix… and a vacation ain’t a vacation if you can’t get your fix.

Now, my Eee PC.  First off, best color ever:

pink, biatch.

Yes, it’s pink.  Yes, I’m comfortable with my manhood.  And yes, I bought it at the last minute and they only had pink left.

It’s the 2G Surf 701.  Linux-based (Xandros) with 512 MB ram, 900 MHz Celeron M processor, 2 GB hard drive – solid state, super fast.  It has 802.11b/g and an ethernet plug, and a few USB ports.  When it’s plugged in, the USB ports pump out enough power to charge an iPod/iPhone.  No CD/DVD drive (or any moving parts at all, for that matter).  Less to burn battery, less to break.

I only have two (make that three) complaints:

  • It’s a little too tiny.  The keyboard is at 83% of the normal size.  That requires a few hours of learning curve to get used to.
  • The standard gmail with it’s bazillion K of javascript is a little too much for the 900MHz Celeron M.  You can do it, but it’s slow as balls.  Switch to the HTML version.
  • The screen (800×480) isn’t quite big enough to display all sites correctly.  Also, it doesn’t quite max out the form factor… those speakers on the side are taking up vauble real estate that could be used for more screen.

So, I think next time I’ll upgrade all the way up to the 1000.  The screen is substantially larger, the keyboard less compressed (92%), and the processor is almost twice as fast.  Of course, that one costs more than twice as much as this one which was only….

250 USD.  Which is exactly half what my phone cost.  Meaning – if my Eee PC grows legs and walks away at one of the hostels – that would suck, but it’s not the end of the world.  If I had brought a ‘real’ laptop with me, I would have had to practically sleep on top of it to relax.

So, final verdict:  It’s awesome.  And it’s for sale.  You know you want it.  Again, if you win and I know you, no shipping charges and we’ll grab lunch.

Update:

Upon further procrastination – ur, consideration – I think next time I travel I’ll get the 901.  Same screen resolution, processor and battery as the 1000, and with the same tiny form factor as the 700 series.  Awesome.  And a good chunk cheaper than the 1000.  But… how can I get that in pink?

Comments (1)

Sights from a Southern Iceland Bike Tour

iceland highway to bluffs

Iceland isn’t much for paved roads. Past about 100km south of Reykjavík, there is a whole one paved road for the next ~500km. Then that too turns into gravel. If you were leave that one paved road and head straight north cross-country across the icecap(s), you would not hit another paved road until you had crossed the entire island and were sitting on the north coast.

Because of this, most people cycle Iceland on mountain bikes, or at least road bikes with urban or mountain tires on there. However, if you’re a Roadie and you kinda just threw your bike in a box the night before your flight, you might have racing tires on there. This means you’re sticking to the paved road. And thus, you’ll see most the same raw, stark, strong, breathtaking sights pictured here.

iceland highway to glaciers

From Reykjavík I headed to the northeast to the Althing, following this guide (search for ‘In and out of Reykjavik’) to get out of town. The Althing’s big claim to fame is that was the world’s first democratic parliament – 930AD, a bunch of Icelandic Vikings. As historical sites in Iceland go, this is the big one. The Icelandic people pull most of their proud self-identity from their Viking ancestry, even if it has been shown that genetically that they’re also Scottish and Irish. Even if not completely in body, at least in mind, culture, language and spirit, they are the Viking people.

Modern Icelanders have marked their best-guess of where the Althing was held with an Icelandic flag.

icelandic flag marking the spot of the althing

Against these cliffs, the speaker’s voice would resonate and project out to the envoys that came from across the island.

cliffs behind the althing

From above the cliffs of the Althing:

from above the althing's cliffs

The Althing was held at the head of lake Thingvallavatn.

lake Thingvallavatn

my bike, at the althing

From the Althing, I cut down to Selfoss. The road was completely empty for the first hour or so… beyond the half dozen vehicles or so that roared by, I saw no sign nor heard no sound of mankind beyond the growling of my tires spinning swiftly on the worn pavement below. Zen factor: extremely high.

Cycling from Selfoss down towards Vík (at the southern tip), your trip is dominated by the approaching Icelandic bluffs.

icelandic bluffs still far away

icelandic bluffs up close

an icelandic farm with icelandic bluffs behind it

As they approach, you’ll notice thin white lines cutting down from the top to the flats below. Those are waterfalls.

an icelandic waterfall from not close

an icelandic waterfall from not far

a wide (and famous) icelandic waterfall

a random icelandic farm and waterfall

Heading around Vík up toward Skaftafell National Park and the huge Vatnajökull Icecap, the grasslands move away. You begin cutting across huge wastelands, created by the icecap dumping rocky sediment down over and over for a few millennia.

icelandic wasteland

icelandic wasteland from the vantage of the bolti guesthouse

The glaciers coming down off the icecaps are intense. I’ve seen glaciers before in California and Canada, but this was something else.

icelandic glacier over a pond

The largest dump of the Vatnajökull actually makes it all the way out to the sea, throwing small icebergs out into the Atlantic where they quickly melt. You get to ride across a steel bridge with icebergs underneath. What is this, Narnia?

icebergs floating out into the ocean, in iceland

icelandic icebergs dumping out

Having a waffle next to a glacier and a few icebergs. That was one damn good waffle.

gotta love it

As you approach Höfn, the wasteland changes back over to farmland, still backed by glaciers coming down from the icecap.

icelandic farm and some glaciers hanging out

Unfortunately, I (actually, more like Stanford to pass the buck) timed my trip to miss summer by about a week. I got rained on everyday and faced strong headwinds about half the time. As the storm got worse, I bunkered down in Höfn for a few days to wait it out. This is the best (and coincidentally, the only) coffee shop in Höfn. Free wifi included! Highly recommended.

kaffihornid, the best (uh, only) coffee shop in 200km radius

After three days of waiting, the weather prediction was ‘bad’ for the next five… so I bailed. Back to Reykjavík. As a student, my flight on Eagle Air was just under 10k Krona (~100 USD), which is like 10% more expensive than the bus and about 8 times faster. They are bike-friendly… no extra charge if you’re under 20 kilos.

Hello, small plane flying in bad weather.

eagle air small plane

I spent several more days (and nights – great nightlife, no need to sleep) in Reykjavík bouncing around. They have a nice network of separated bike trails that rings the city several times over.

photo of bike map of reykjavik

Finally, I rode out to the international airport in Keflavík for a flight to Berlin via Iceland Express – also relatively bike-friendly. No bike box or bag required. Once you get out of Reykjavík, the ride to the airport is on the freeway shoulder. The entrances/exits are a little intimidating but they’re pretty empty of traffic cause everyone’s going to the airport. It’s really a pretty fast and efficient ride. When I first arrived in Iceland, I didn’t ride from Keflavík to Reykjavík… but if I do it again, I will. It’s a fat 10 foot shoulder the whole way. Pray for tailwinds!

Comments (4)

Wireless on the Stena Line

I’m on the Stena Line ferry right now heading from Hoek Van Holland to Harwich, England. They have wireless!

Kinda.

As is common in captive-audience no-competition environments, (read: airports) wireless goes for outrageous prices. But even given that peer set, this is ridiculous. The only logical justification I’ve been able to come up with for charging this much for access is to purposely limit the number of users so that the satellite link doesn’t get clogged. But I doubt that’s the case. I’m willing to bet 100 bucks (and my pride) that they’re off the ‘maximum profit peak’ (I dunno econ) by at least a factor of two.

As an end-user, you have two choices:

  • One device, one hour: 6 euro (~8.50 USD)
  • One device, three hours: 9 euro (~13 USD)

I have two devices (a phone/camera and a laptop) I need to both be connected to the internet to publish content effectively. I want to be connected the whole trip. It’s a 6.5 hour ride. I arrived an hour early. So for internet access, I need:

Two devices, three three hour segments each, for a total cost of… 2×3x9 = 54 euro (~77 USD). Are you on crack?! I paid 33 euro for this trip! I have a sneaking suspicion that the person/people making the decisions here know about as much about the internet and computing as John McCain

So, hello VIP lounge!

Only 16 euro, and for the whole trip I get as much bandwidth as a I can drain, free drinks, plush seats, and no screaming kids and drunk guys. Except maybe me. Rock n’ roll. This could get addicting…

Comments (1)

OpenDNS cracks Top 500

I’m very happy to note that OpenDNS just recently cracked the Alexa Top 500. They edged up over some hard hitters like perezhilton.com and rapidshare.de.

If you haven’t taken the time to check out OpenDNS, do so. A safer and faster internet – for free. If it sounds too good to be true, well, that’s why they’re still growing quickly. These internets, they’re a-changing, a-changing fast, and OpenDNS is one of the players pushing them in the right direction.

Comments (2)

Cycling Southern Iceland, Top 10 Musings

This is the first of a few posts I’m going to regurgitate about cycling in Iceland. This post is focused primarily on the technical details that make or break a bike tour, posts to follow will be more about Iceland with pretty pictures, etc.

awesome road for biking in iceland

Top 10 things to consider when planning your cycling trip across southern Iceland:

  1. The weather.
  2. The weather.
  3. The weather.
  4. Your tires. Are you planning to head off the ring road at all, or continue past Höfn? (as of 2008) Then you need something that can handle gravel roads. 35mm and up, I’d recommend. If you stick to the paved part of the ring road, I’d recommend 28mm and up. (I did it in 23mm, and never felt good about my contact with the road. Averaged one flat per day.)

    The roads wear down differently in Iceland (compared to California). It looks like their asphalt mixture is higher in gravel and lower in tar. In any case, rather than potholes or seams in the road appearing, it turns into a bed a sharp rocks. Works great if your tires are much bigger than the rocks. Not so awesome if they’re about the same width. Like I said, I averaged one flat per day… some of those were tire slashings.

    little sharp rocks = road

  5. The weather.
  6. Feeding yourself. It’s challenging to find any food for parts of the ride. There are 50km stretches with no settlement whatsoever, let alone food. When you do find food it’s generally a convenience gas station store. Don’t expect to find any power bars here. But snickers, granola and trailmix can go along way! Complex carbohydrates and protein are your friend, excessive fat and grease, not so much.

    hum, grease and protein or grease and grease?

  7. The weather.
  8. Sleeping – every community, if it has a gas station, also has a campsite and a hostel. The hostels generally expect you to supply your own sleeping bag. The campsites, which are generally right next to the hostel, are very nice and usually include all the amenities (like a hot, clean shower) that the hostels have, minus the French dude who snores a whole bunch, and his French friends who snore a lot too. (nothing against the French here, I swear)
  9. Uh gee, the weather?
  10. Bike tools and parts. There is one bike shop south of Reykjavík, in Selfoss, and it carries a very limited selection of parts. So if you don’t want a broken chain to turn your tour into a different type of adventure, you need to carry a spare chain and chain tool. Same with a broken spoke. Same with a slashed tire. Etc, etc.

    bike all ready to rumble across iceland

Bam, end of top 10. Notice ‘traffic’ didn’t make the cut. Not even close. Once you get out of Reykjavík’s urban area, this is a complete non-issue. Iceland drivers drive fast, and are not very bike-savy, but they’re aren’t all that many of them to worry about!

‘Mountains’ or ‘hills’ didn’t make the cut either. There are a few steep grades (like 12%). But the highest paved pass in all of Iceland is only some 600m or so. By California status, that would be a ‘hill’. I didn’t run across any climbs taller than ~200m.

Now, let’s talk a little more about that weather thing. As a cyclist in Iceland, there are three important parts of weather you care about:

  • Wind: The wind is always blowing in Iceland. The question is, what direction? And how hard… hard enough to push you across the lane/to a stop? Or just an annoyance when you’re fiddling with the map?
  • Rain: Nearly every day in Iceland is at least partly cloudy. Any cloud may dump a short load of rain as it blows quickly by. A good day is no, or almost no rain. A average day is scattered rain. A crappy day is sheets of rain, coming down all day. You are soaked in minutes.

    I got nailed by this soak-you-to-the-bone storm about 5 min after this picture was taken.

    man versus nature

  • Temperature: Comparatively, this isn’t such a big deal. But Iceland in September does hit a very key spot on the thermometer for cycling. In my experience, if it’s above about 15C (~60F) while cycling, it’s hard not to be warm enough… your body is just generating so much heat from the energy you’re exerting. And below about 10C (~50F) it’s very hard to not be cold. The wind chill from your movement through the air just sucks your heat away. Southern Iceland in September is playing around in this no-mans land… I had morning temperatures as low as 8C, and daytime ones as high as 14C.

This is your new best friend: http://en.vedur.is That’s the best weather resource out there for Iceland. Problem is, its confidence interval is about +/- 1, on a scale of three. So, if it says good, that means ok or good. Bad means ok or bad. And a prediction of ok means nothing. And… of course, that’s the usual prediction. As one store clerk put it when I asked her how the weather was supposed to be the next day – “oh, more Iceland!”. Yup. All righty then.

I don’t want to give the impression that cycling Iceland is all pain. But compared to other places I’ve toured (California, Holland) Iceland is much more challenging on the ‘basic survival’ level. Just don’t take it lightly, and come prepared!

More fun picture posts coming. Stay tunned.

Comments (3)

Upgrade to Wordpress 2.6(.2)

Only about 3 months late getting up to the 2.6 line… nothing wrong with letting someone else find the biggest security holes & bugs anyway.

Please let me know if you see anything that doesn’t look quite right.

The upgrade process from 2.5 was relatively painless. This isn’t actually what I did, but if I was going to do it again, this is how I’d do it. I did all this stuff, just out of order and with needless downtime.

  1. Full backup (cp -rp) of the wordpress filesystem, full mysqldump of the database. Copied both to remote server.
  2. Updated all my plugins to the latest and greatest. Spotcheck that all is good, another round of backups.
  3. Disabled caching, cleared the cache.
  4. In wp-content/plugins/, did svn pd svn:externals
  5. In wordpress’ root dir, did svn sw http://svn.automattic.com/wordpress/tags/2.6.2/ ./
  6. Fixed up permissions by doing find ./ -type f -exec chmod XXX {} \; and find ./ -type d -exec chmod YYY {} \; from wordpress root dir, where XXX and YYY are the minimum permissions required by your webserver configuration for files and directories.
  7. Added some more random permission fixes, like webserver write to wp-content/cache/, etc.

And… wordpress upgraded the db for me on the first administrator login, I re-enabled my plugins without incident, made another round of backups, and it looks all good to go. Plz let me know if you notice anything a little wack!

Comments

Intel 4965AGN, T61p, and Debian

My new T61p has the standard built-in Intel 4965AGN wireless card for 802.11b/g/n goodness. The kernel has had driver support for this hardware since 2.6.24. But, after doing a default Debian Lenny install, the wireless just ain’t working… what gives?

Well, this comes up in /var/log/syslog and others:

iwl4965: iwlwifi-4965-1.ucode firmware file req failed: Reason -2
iwl4965: Could not read microcode: -2

As is explained here, the iwlwifi drivers require a binary firmware (aka microcode) image to function. The drivers themselves are free, both as in beer and as in freedom. However, the microcode images, in order to enforce end-user FCC compliance, are free as in beer but not freedom. Thus a default Debian install, which bends over backwards to be free as in beer and free as in freedom, does not include the microcode images.

Two options:

  1. Install the firmware image yourself. Find the image you need here (as of August 2008 the version you want was 1.21), download it, extract it, and copy it to /lib/firmware/iwlwifi-4965-1.ucode.
  2. Or, add the non-free repositories to your /etc/apt/sources.list, and do an apt-get install firmware-iwlwifi.

Or, pretend you didn’t really want wireless if you can’t have it free as in freedom… and put it on your to-do list to reverse-engineer that binary firmware image. Buena suerte! ;p

I can’t remember if a reboot was necessary after installing the microcode image. But that should be it in terms of edits and installs… everything wifi, all the way out to the gnome GUI, should now just automagically work.

Comments

Reykjavík on Two Wheels

Not that exploring Reykjavík by bike is really that different than doing it by car or on foot/bus… but it is preferable to some old school transport modes:

Reykjavík viking boat

Greater Reykjavík holds only about 200k residents (~2/3 of Iceland’s total population), but the city puts on a show of more than three times that, by US standards. Commerce is concentrated in the downtown core, which, along with pretty much the rest of Iceland, is under seemingly continuous construction. It’s difficult to get an overview shot of downtown, but this is from one of the parks on one of the surrounding hills, looking west here.

Reykjavík skyline attempt

Everything in Iceland is extremely clean, functional, precise, well-maintained, quality, clear, ridiculously safe (even the police, of which you will not see any, do not carry guns) – if you’re OCD, you will find peace here. This is all by US standards. In one week of wandering I have yet to come across a dirty bathroom, a door that doesn’t quite fit, a resentful cashier, or even moldy bread. And I’ve been staying in the cheapest places in the country – camping, hostels and guesthouses. As far as I can tell, there is no (like, zero) pavement in Iceland that is as bad as San Francisco’s average street. And I’ve ridden over some 500 miles of it – and I’m not exaggerating. That ‘higher standard of living’ thing – it really shows.

One of the dominating features of Reykjavík’s skyline is this huge church, the Hallgrímskirkja. Which, of course, was under (re)construction when I was there.

Hallgrímskirkja

Hallgrímskirkja inside

Appearently that statue out in front was a gift from ‘The People of the USA’ to those of Iceland in 1930, in celebration of the 1000 year anniversary of the world’s oldest parliamentary democracy. Go us! Kinda like the Statue of Liberty, just more, well, how to put this nicely… economical.

Speaking of Americans, aside from those on my flight in from San Francisco via Minneapolis, I neither met nor overheard any American accents during my two days in Reykjavík. The closest I found was Montreal. Which, as anyone from the Heartland will tell you, is a long, long way from American.

That’s not to say you can’t get by with English. You are 100% fully functional with English here – if you manage to find an Icelander that isn’t fluent in English, then they’re not actually an Icelander… they’re a French tourist or something.

Reykjavík’s downtown has European-style narrow streets, with a streetwall of 3-5 stories. Aside from the expressways, roads and streets do not have shoulders – rather a sharp curb to mark the end of the street and the beginning of the not-street. Very pedestrian friendly, if not so much for bikes. All the crosswalks are raised to the level of the ’sidewalk’ (which, outside the downtown, is generally a completely separated paved path, more like the American idea of a ‘multi-use path’ – bikes are legal). This isn’t a Reykjavík thing though – it’s an Iceland thing. You’ll find this even in little communities of a few hundred people hundreds of km from anything bigger – the crosswalks are raised and made of brick. What, building for people not cars? Silly hippies.

Reykjavík street

another Reykjavík street

And it’s true – most everything in Reykjavík (and Iceland in general) is expensive. I paid 900 Krona for a beer with dinner in Reykjavík – about 10 USD. In general, expect to pay about twice as much as in the US. The big exception: budget sleeping. Just like seemingly every single community over zero residents, Reykjavík has a campsite (in town) and a hostel. The campsite will run you under 10 USD, and a bed in the hostel (bring your own sleeping bag!) will run you 15-20 USD. I stayed in the campsite:

Reykjavík campsite

Finally, why on two wheels? Well, two reasons for that. First, Reykjavík is relatively auto-oriented compared to its European counterparts. There are very functional and efficient expressways that divide the downtown from its waterfront and the parks that stretch along it. Parking is only regulated in the central downtown core. Bicycles are a new thing in Reykjavík… but those ‘multi-use’ paths are being built everywhere across the city. There is no rail system in Reykjavík (or Iceland at all, for that matter). The bus system is much stronger than those you’ll find in the states, but still isn’t enough to make transit preferable. So, this all adds up to – unless you choose to rent a vehicle, exploring Reykjavík by bike is a smoother ride than by foot/bus.

Second reason to go on bike… after exploring Reykjavík, you can go on tour across the island!

leaving Reykjavík for bike tour of iceland

Comments (2)

Stars Galore: White Mountain @ Midnight

Disclaimer: If you use this information to get yourself or someone else killed/hurt, I am in no way responsible.  Be smart and do not just trust some random blog.

White Mountain is arguably the best place in the lower 48 to stargaze (especially if you happen to see in microwave frequencies and are looking for polarization in the cosmic microwave background to test inflation theories).  This is a product of the extremely dry air and relatively high elevation (14,246′) – thus less crap (aka ‘atmosphere’) between you and outer space.

white mountain

Even the iPhone almost manages to capture the beautiful stars (and by ‘almost’, I mean ‘fails completely’):

white mountain 'stars' with iphone

Not only is it awesome, but White Mountain is also the least technically difficult of California’s fourteeners.  It’s a Class 2 4-wheel drive jeep trail to the top (although it’s closed to vehicles).  Hell, this bad ass did it in a wheelchair.  So, with proper precautions and equipment, it’s a great candidate for a night hike.

The approach to the trailhead involves nearly an hour of gravel/dirt road driving.  If you’re doing this at night, there will be nobody on the road.  Be prepared – a failure with your vehicle here is just as serious as a failure with your body later on the trail.

The hike itself is a 15-mile round trip with about 3,000′ total elevation gain/loss.  I’ve marked the trailhead below at the bottom of the map.  The peak itself is marked by Google at the top.  If you switch to satellite mode and zoom in, you can trace the trail from trailhead to peak.


View Larger Map

The challenge, of course, is the elevation.  The parking lot sits at about 11,500′.  If you’re coming straight up from sea level, you will most likely be experiencing minor altitude sickness syndromes before you have even parked your car.  If this is the case, you will be dizzy, nauseous, have a pounding headache and be unable to think clearly at the peak.  Don’t do this.  Spend some time acclimating beforehand – camp at the trailhead the night before, at very least.  I spent the preceding week before in Tahoe (6,000′) and was ok to about 13,000′.  If you’re in 6-minute mile physical condition, accent and decent will each take 3-4 hours, depending on how hard you’re pushing it.

To do this hike safely, you must be prepared to spend the night on the mountain should something go wrong.  You must be carrying enough clothing with you so that a sprained ankle does not turn into a life-threatening situation.  For me, in the warmest month of the year (August) this meant:

  • thick pants, long johns
  • wool socks, running shoes (No, not hiking boots.  Use them if you want to, but they are not necessary here.)
  • gloves, beanie, glasses with night lenses (wind protection)
  • thin undershirt base layer, medium weight fleece layer, medium weight wind-proof jacket

This was on the light side.  If I did it again, I would add one spare layer to both my top and bottom.

As a rule of thumb, you should be carrying enough food and water to last twice as long as you expect to be out.  For me, this was 112oz of water, three power bars, a package of salami, 6 whole wheat bagels, two things of yogurt and a big one of potato salad.  As you’re hiking, you need to catch your thirst and hunger before it affects your body. This means if you feel weak or thirsty, you’ve already failed. Force yourself to eat and drink constantly.

You also need to be redundant on all mission-critical components:

  • spare batteries
  • spare headlamp bulb
  • spare water container – bring a backup 32oz or so in addition to your primary repository.
  • spare trail – have a viable plan ready should you lose the trail. Keep track of landmarks, bring a topo map, compass and/or GPS.
  • spare brain – do not do this hike alone!

With the proper precautions, fitness and equipment, you’ll be able to relax and enjoy the hike. When you find yourself thousands of feet above treeline, dozens of miles from anybody outside your party, and can see for hundreds of miles in every direction with the stars peppering the sky like a golden blanket of dust – the Zen factor is extremely high.

Comments