Noteworthy

Hey, this site made the Noteworthy list at CSS Vault! Maybe now I will get more google love. I find it very odd that my site shows up eight or nine down when I search for my own name.

Posted by ryan on February 24, 2005

My powerbook is now even more awesome

You can make yours awesome in just three easy steps.

  1. Download iScroll2.
  2. Install.
  3. Enjoy.

Posted by ryan on February 23, 2005

Portfolio

Whadaya know, there’s a portfolio! I’m not sure how that got there…it wasn’t there yesterday. As you can see I haven’t done much yet, but I hope to remedy that, hence the portfolio. Check it out!

Posted by ryan on February 21, 2005

A matter of security

Today was interesting. It seems I was on a construction kick with my photos. I think maybe the photo of the power plant seemed like pretty suspicious behavior to the workers there. There were two workers off in the distance that went inside after I took a couple of shots. Then as I was leaving, this guy started walking toward my car. I didn’t talk to him or anything, I really was leaving, and it’s not like the building is a secret or anything. I don’t know, maybe I’m just fooling myself into thinking my day was much more exciting than it really was.

Posted by ryan on February 16, 2005

Besides…I’m training to be a cage fighter

What was I thinking!? Did I just post about something meaningful with my little php tip? I must remedy this situation. This post is not important or even helpful, but it won’t confuse anyone who is used to reading pointess ramblings when they visit my site.

I recently saw Napoleon Dynamite (ok, I saw it four times) and it’s probably the best movie ever made…if anyone could even know that. There, that was totally pointless. I feel much better now. Now if I could just get someone to bring me my chapstick…

Posted by ryan on February 14, 2005

Random Images

One way designers add variety to a website is to have a random image appear in the header of the page. A great way to implement this is using the mt_rand() function in php. This function takes two arguments (1 and 5 in the example below) and returns a random integer in the range specified by the two arguments.

Example: <?php $logoId = mt_rand(1,5);?>

Note: I’ve been informed that in php < 4.2.0, mt_rand() must be seeded manually. An easy way to do this is to add this line before your mt_rand() call.

<?php mt_srand((double) microtime() * 1000000); ?>

Once you have a variable ($logoId in this example) containing your random integer, you can use that in the file name specified by the source property of your image tag.

Example: <img src="/images/logo_v<?php echo $logoId;?>.jpg" alt="alt text"/>

In this example, if $logoId is 4 then the image source will be /images/logo_v4.jpg. Likewise, if $logoId is 2 then the images source will be /images/logo_v2.jpg. This is a very easy way to have a random image. Once you have those two lines of code, you just have to make sure your image files exist and you’re done. If you wanted to have six images instead of five, you would just change the 5 in mt_rand() to a 6 and add the appropriate image file to your images folder.

Posted by ryan on February 14, 2005

Redesign

Well, I figured it was time for a redesign. I hadn’t done one in like a month and a half and since I obviously don’t spend any time putting content on my site, I had plenty. No really, I have been busy with other stuff. What kind of stuff, you say? Well, I’m glad you asked. I’ve recently designed two other websites. (they will not be redesigned every other month…I don’t think) They are both for my church. One is the church’s main site and the other is for our mission trip to Russia. We will be going to Russia over Spring break to work with a local church in Kirov. You can check out the site for more information.

Posted by ryan on February 11, 2005