Jun 25 2009

i must be doing something right

The infamous Misty Murphy posted a picture of a cafepress climbing shirt I designed. I’m honored :) Hey Misty, you might like this shirt too:

pics 006

pics 010

Check out more pictures of shirts I’ve designed.


May 5 2009

poor blog

My poor blog, it gets so little love. Today I give you back your old wordpress theme, elegant grunge (with some modifications of course) and a picture of Flat Stanley helping me at work today.

flat stanley


Jan 16 2009

nutrition for climbers

A month or so ago I was at PRG and came across a flier asking for people to participate in a survey of nutrition for climbers. It sounded interesting and I’m always up for helping fellow climbers in endeavors like this.

When I went to the url on the flier I found not only the survey, but a whole blog dedicated to “Sport nutrition for rock climbing”! Sweet sauce! This is the first online resource that I’ve found for climbing nutrition outside of various informal forum posts. There aren’t may blog posts yet, but what’s there is gold. I’ve learned about oxidative stress, good practices for hydration, and recipes for great climbing meals.

The blog’s author, Krystal Merrells, does a great job at explaining everything. Often times I find that when experts in the nutrition field start seriously talking about nutritional concepts, everything quickly goes over my head. This is not the case here. While Krystal does have a recently publish research paper titled “Following 2 diet-restricted male outdoor rock climbers: impact on oxidative stress and improvements in markers of cardiovascular risk” that goes into these crazy details of nutrition and climbing, her blog makes everything understandable to even noobs like me.

Check out her blog, and if you find the information useful at least take her survey. Keep up the good work Krystal!


Nov 8 2007

email munging using javascript for wordpress

Anyone who wants to post their email address on the Internet should be wary of spiders picking up their address and filling their inbox with spam. Here’s a little trick that hopefully keeps your email address hidden from spiders, but allows normal users view it easily.

This will actually work anywhere you can get JavaScript to run. In the case of WordPress, there’s issues getting JavaScript to run directly in a post. So what I did was created a contact page. Within the contact page I put:

If you'd like to contact me about anything at all, feel free to email
me at <span id="foo">test</span> or send me an IM on google talk.

<script language="javascript">
    //<code>

    a = ["mai", "lto", "benjamin", "lee", "smith", "gm", "ail", "com"];//
    b = a[0]+a[1]+":"+a[2]+"."+a[3]+"."+a[4]+"@"+a[5]+a[6]+"."+a[7];//
    c = a[2]+"."+a[3]+"."+a[4]+"@"+a[5]+a[6]+"."+a[7];//
    document.getElementById("foo").innerHTML = "<a href=\""+b+"\">"+c+"";//
    //</code>
</script>

When the page loads, the contents of the span will be replaced with my email address. My email address is pieced together from the contents of an array, which I think obfuscates my email enough such that spiders (unless they’ve started executing JavaScript) won’t be able to understand.

There are also a couple of other hacks going on here to get it to work in Wordpress. The code tags only exist to keep wordpress from touching the JavaScript syntax and escaping things like the greater than and less than characters. The code tags themselves are commented out, so that the JavaScript won’t worry about them being inside of the script tags. And at the end of every line of JavaScript there is an empty line comment, to escape anything that WordPress puts at the end of a line. If you’re not dealing with Wordpress, these things can be omitted.


Oct 9 2007

pictures page

I’ve added a pictures page to my blog. It’s just a slide show of my most recent flickr photos, but makes for a nice way of checking out my latest shenanigans.


Aug 23 2007

a new way to embed google maps

Google has announced a new way to embed google maps by providing a snippet of html that can be copy/pasted anywhere. No API key or HTML munging necessary. Just click on the “Link to this page” link, and grab the html for the map you’re viewing. Here’s an example showing the rock gym I climb at:


View Larger Map

Pretty slick!


Aug 17 2007

pasting code into wordpress

Until recently, I always had trouble figuring out the best way to format code snippets I wanted to post on my blog. I had trouble with losing the whitespace, lines of code being too long for the page, or the formatting would just plain suck. I’ve found the best solution is to place code within the following:

<pre style=”width:500px;height:400px;border:solid 1px #ccc;overflow:scroll;”>
paste code here
</pre>

This will create a nice little border around your code, along with scroll bars, AND preserve the whitespace. This solution brought to you by the wordpress forums.