My URL Shortener
For some reason I’ve wanted to create my own URL shortener just for my stuff for some time now. It’s finally here: the jbe.me URL shortener. Now, I’m the only one that can use the service; it’s only for my links, but when you see a jbe.me URL you at least know it will link to something I’ve done.
It was super simple to setup.
First of all, I had to buy the jbe.me domain name ( think J B dot ME ). Unfortunatly jb.me is not a valid domain, I’m sure someone much more important than I will grab it. Anyway, jbe.me was the next best thing.
One I had the domain I installed the YOURLS (You Own URL Shortener) script at that location. It’s a series of scripts that talks to a MySQL database with some pretty cool bookmarklets and an API. The API was key for the next step: the Twitter Tools extension. As many people know, I use twitter tools to post new blog entries to my twitter profile. Since I want to get as much of my URL-shortening as possible done through the jbe.me shortener now I needed to get twitter tools to use the new system. Twitter Tools has it’s own api that will let you create a shortener for any service that you could think of with some hooks that it install for WordPress. Then I threw a plugin together using the YOURLS API and now when I publish a post, Twitter Tools uses the jbe.me shortener to shorten the URLs. Pretty Cool.
Read the rest of this entry ›
Published: March 2nd, 2010 in Web | Tags: shortener, URL, Wordpress
Anything Slider: Go on “Go”
Last week when I was in the CSS-Tricks forums, somebody wanted to modify the functionality of Chris Coyier‘s anythingSlider. Not a huge change, he just wanted to make the slider advance to the next panel when you click “Go”. Made sense to me. By the time you click “Go”, you’re done looking at that panel and are ready for the next one. If it doesn’t advance until after whatever delay you’ve setup, it could be confusing.
Basically what we want to do is make the slider advance to the next panel when we click go, which is the same as advancing to the next panel after we click the start/stop button if the slider ends up playing. It sounds complicated, but it will make more sense when we look at the code.
base.$startStop.click(function(e){
base.startStop(!base.playing);
if(base.playing) base.goForward(true);
e.preventDefault();
});
Read the rest of this entry ›
Published: February 9th, 2010 in Web | Tags: anythingslider, css-tricks, jquery
Youtube, Vimeo Showing in HTML5
Both YouTube and Vimeo recently gave an option to watch videos in HTML5. I switched right away knowing that every time I try to play an HD video on YouTube, my Macbook fan spins up because of the heat caused from flash processing. On the Dell Mini I just bought, I couldn’t even watch HD videos on youtube because HD video in flash was too much for the atom processor.
When I saw that YouTube and Vimeo were offering HTML5 instead of flash video, I immediately tested both of the above mentioned issues. The fan in the macbook stayed quiet and the Dell Mini didn’t have any problems when I watched HD content with HTML5 video instead of flash. This is an example of the power of HTML5 video and why Apple decided to skip flash on the iPad.
The other thing that I really like about this is the fact that it pushes the HTML5 spec forward that much more. Obviously Google is involved in developing HTML5, so it shouldn’t be a surprise to see this on YouTube. Vimeo, however, is not involved — at least that i know of — in developing the HTML5 specification and just wants clean, efficient code. HTML5 is a good way to do that.
Read the rest of this entry ›
Published: February 7th, 2010 in Web | Tags: html5, Video, vimeo, Youtube
A Contact Page to Avoid Spam
There are too many website owners displaying their email address in the “name [at] tld [dot] com” format, or something like that. Whatever happened to the good old mailto link with the email address being displayed how it’s supposed to? I’ll tell you what happened — spam happened.
Many site owners are afraid of displaying their email address, as it should be displayed, on their site. Since spammers can use scripts to scan websites, the same way google does, to look for email addresses. I’ve been seeing more and more contact forms and weirdly formatted addresses to combat the issue, but there’s a better way.
The robots.txt file in the root of your website is where you control what these bots can do and what they can’t. So if you’ve got your contact info on a certain page, then don’t allow bots to view that page. Bingo.
Now, the robots.txt file isn’t a standard and there’s nothing that guarantees that spam bots will follow the rules, but we can take this a step further.
Read the rest of this entry ›
Published: January 31st, 2010 in Web | Tags: robots, Spam, Web
Problems Getting WordPress Emails
Are you having problems getting email sent from you WordPress blog?
One of the features that I really like is being able to get emails when new comments are posted. I also use the Contact Form 7 plugin which needs to send mail.
The Problem
I recently switched web hosts to Webfaction. They’ve been great — what I think you should be able to expect out of shared hosting. The only problem is that they don’t support PHP’s mail function. They claim it’s to reduce spam — mail() can be used to send email defining the from address as whatever you want without having to authenticate. It can be very convenient, but it’s really not the ideal way to send mail using PHP anyway. WordPress does it because it’s pretty rare to find a server that doesn’t support it and the alternatives are too commonly uninstalled.
Read the rest of this entry ›
Published: January 11th, 2010 in Web | Tags: plugin, Wordpress