Use htaccess to Rewrite Folder Structure

*geek alert*

I spent a long time trying to figure out this solution, so I wanted to share it here to possibly help someone else. If you are looking to redirect an existing path on your site, like:

www.mysite.com/old/folders/content
to something like:
www.mysite.com/new/directory/content

Add this (and tweek to your needs) to your .htaccess file on the root of your website.

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^old/folders(.*)$ http://www.mysite.com/new/directory$1 [L,R=301]

— December 30th, 2008

Christmas Mix 2008

I used to create Christmas mixes and burn CD’s for my family and friends. Consider yourself lucky if you are the proud owner of the famous “Pete’s Christmas Mix 2002″. It’s been a while since I put one together, I mean who listens to CD’s anyway?

This year I’m posting my mix on my site for your streaming enjoyment. Bonus: I threw in my favorite line from my favorite Christmas movie, Christmas Vacation.

http://www.paulmayne.org/music/christmas2008/

— December 18th, 2008

Twitter HTML Badge Code

I’ve had a some requests for the code that I use to populate my sidebar with my Twitter status in HTML. Twitter’s default badge offerings are mostly worthless and at this point very ugly. I basically stripped out some JavaScript to parse and display your Twitter JSON file using JavaScript.

If you view source on this page (twitter.html), you can copy and paste the needed parts into your own page.

  1. CSS Style (could be in an external CSS file or in the html head), customize to your liking.
  2. Two JavaScript functions (in the html head).
  3. HTML code – using span id’s to place the parsed data into.
  4. JavaScript command to initiate the functions – I recommend putting this as the last thing on your page before the </body> tag. Sometimes it may take a few seconds to get the data back from Twitter and you don’t want your page waiting on Twitter to finish loading.

Now you need to customize it for your own Twitter account:

  1. Change the “via Twitter” link to point to your Twitter page.
  2. Change the “51373.json” in the last javaScript call to your Twitter ID. To find your Twitter ID, clicking on the RSS link on your Twitter page and look at the number in the URL.

Use and customize as you wish, Enjoy.

UPDATE:

Thanks to Tuamo for pointing out a solution to a JavaScript bug in Internet Explorer. I have updated the sample code linked above. Cheers!

— December 3rd, 2008

Cruise

Last week I spent I spent a relaxing week in the Caribbean with my family. My mom treated us to a family cruise vacation we’ve been meaning to do for a few years then delayed after my dad got sick.

All aboard

We rode on the Liberty of the Seas by Royal Caribbean on a 7 day cruise. We stopped in Philipsburg, St. Maarten; San Juan, Puerto Rico; Labadee, Haiti. Even though we were avoiding the many hurricanes present down there last week, the weather was mostly sunny, my sunburn can attest as can my wife who now looks Latino.

I will point out that the casinos are rigged. Don’t ever gamble on a cruise ship unless you want to donate your money.

It was a blast and I recommend it to anyone wanting to escape in luxury for a week. It was especially fun to be with my sweet wife, my mom and my sis and bro-in-law for a week. By the end, I think they were all tired of my jokes and antics, but I’m pretty sure they still love me.

I took a bunch of snapshots and posted them on flickr.

Update: Jana’s cruise post. / Sister Jamie’s post.

— September 10th, 2008

I Can Haz Twitter

If you don’t know what Twitter is, it’s a micro blogging site where you are prompted to answer the question, “What are you doing?” in 140 characters or less. Like:

whoa – a bird just pooed on my keyboard whilst sitting in a cafe

Mario Klingemann 06:02 PM June 05, 2007

Updates can be made via text message, the website, or one of the many Twitter desktop and iPhone apps. I currently like Twirl, Twitterific and TweetDeck, but mostly just use the website and text messages.

Twitter used to have IM functionality with Google Talk. It has since been shut off due to the popularity of the site and the hardware demands. Twitter is known for being down often, but hopefuly these issues will be resolved soon. Twitter, PLEASE fix notification for @replies ASAP!

I’ve been using my Twitter account daily since December 2006 with over 2000 tweets. I average two posts per day, some days a lot more and some days not so much. I find it fun and informative as a tool that is so simple, yet opens up to so much opportunity for other uses. I check my friends status updates often, but not to the point that I must read everything that gets posted. That’s what I love about Twitter, it’s like an ongoing conversation (or lots of them) that I can casually check into when I feel like it. Contribute a comment or make a status update, just check in and see what’s going on.

I follow APNews, nprpolitics and Woot to be notified of breaking news and crappy gadget sales. In addition to Following someone on Twitter, you have the option to turn on “Device Updates” for a person you follow. Then you will receive updates via SMS whenever that person posts. This can get annoying if you follow someone like Robert Scoble.

Wired Magazine asked a few of Twitter’s top talents “How to Twitter” in 140 characters or less, here are a couple of my favs:

“Every single Twitter post you write should be something that could get you laid, ruin a marriage, or bring a tear to a fat little kid’s eye.” — Joshua Allen

“Don’t try to impress — just be yourself. But go a little beyond your comfort zone; share something you’re hesitant about sharing.” — Evan Williams

There’s a countless amount or great people worth following on Twitter (Gawker actually posted a list of their top 12), here are a few that keep me entertained:

If you feel like following my Twitter posts, I am paulm. I’ll try to keep the potty humor to a minimum.

Laughing at my Twitter

— August 13th, 2008