Highlight Source Pro - A must have Plugin for Code Whores
If you’re like me and occasionally need to post code snippets in your wordpress powered blog posts, then you absolutely adore the highlight source pro plugin by Christian Knoflach. Gone are the days of hard to read and uncopyable code snippets. Highlight Source pro not only displays your code as a preformatted text via the <pre> tag, but it also uses the Geshi color coding system to give your readers properly highlighted code, with no additional effort from you! Just start a block using a <pre> tag in html view and give it the proper language attribute. As an example, for a block of php code, you would enter the following:
-
<pre lang="php">
-
echo("This is a sample of a block of php code.");
-
echo("any code will work here, from php to BASIC to bash.");
-
echo("it will even make sure that the block scrolls without breaking your page template on really long lines like this one.");
-
echo("though you may have to type all of the code with the WYSIWYG editor disabled.");
-
?>
It’s as simple as that (and yes, I’m using the plugin to show you how the plugin works!
The only drawback is that if you’re using the visual editor, you may have to go back and add your code at the end, then save the post from the code editor. This is only a minor annoyance, however, and I think that the pluses definitely outweigh the negatives.
If you’ve got code to share with your eaders, I think this little gem is more than worth the time and effort to use.
Starting a small business? An Answering Serice might be the right choice for you.
If you’re starting up your own home based business there are a lot of different things you need to consider before you go mainstream.If you are operating as a freelancer or a consultant you will most likely spend the bulk of your time out of the office or at the customers place of business. Answering a call while working in these environments may be counterproductive or even downright rude. For this type of business, it’s best to consider your telecommunications choices carefully.
An answering machine or simple voice mail box might get you by for a while in a pinch, but this will brand you as “just one of those little companies”. If you want your customers and prospective customers to have the best possible experience while creating a simple way for your brand to stand above the other guys in your field, why not consider using an Answering Service? The benefits of this type of service are varied and include the fact that your customers or clients will be talking to a real person each and every time they pick up the phone. There is no chance of the dreaded “leave a message after the beep” that you get with voice mail.
Answering Services can also field common questions that your customers may have regarding your services or products, freeing up your time to do the work you love. Let’s face it, you started a home based business because you were passionate about what you were doing.An answering service might seem impersonal from your perspective, but from a callers perspective it is a much better experience all the way around.
Think about it from the customer’s perspective. They get a live human being each and every time they call. In todays world of computerized phone systems, there is simply nothing that compares to that. Think about it. The solution may not be right for you, but in business you have to weigh every option available.
Using Akregator with Firefox 3.0
If you’re a linux user like I am, there’s a good chance that you’re using Firefox as your web browser and Akgregator as your news reader. Since Firefox has no native support for Akregator, you have to set up a little script of your own to get everything working together.
First, run a text editor as root. In Gnome, type the following in a terminal:
gksudo gedit
In Kde, type the following:
sudo kate
Paste the following code into the editor of your choice:
Download the akadd.sh shell script and save it to your hard disk.
Download: akadd.sh
Open the code in your text editor as root.
The code listing for the script is as follows:
-
#!/bin/bash
-
#
-
# Add an RSS feed - either podcast or news. podcasts get added to amarok, news to akregator,
-
-
main () {
-
for f in "$@"; do
-
f=${f:7}
-
f='http://'$f
-
# GET the feed and try to guess what type it is.
-
GET "$f" | grep -i enclosure |grep -q -i -e mp3 -e ogg
-
if [ $? -eq 0 ]; then
-
addPodcastFeed "$f"
-
else
-
addRegularFeed "$f"
-
fi
-
done
-
}
-
-
startKDEProgram () {
-
# note, doesn't need to use nohup and bg - kde progs do this already
-
# usage: startKDEProgram program timeout
-
dcop |grep -q "$1"
-
if [ $? -ne 0 ]; then
-
am_running=0
-
tries=0
-
echo "$1 not running… starting it…"
-
"$1"
-
while [ $tries -lt $2 ] && [ $am_running -eq 0 ]; do
-
echo "still waiting for $1 to start (giving up in $(($2 - $tries)) tries)…"
-
sleep 1
-
dcop |grep -q $1
-
if [ $? -eq 0 ]; then
-
am_running=1
-
fi
-
let tries+=1
-
done
-
echo "tries made = $tries"
-
if [ $tries -eq $2 ]; then
-
kdialog –error "couldn't start $1"
-
return
-
fi
-
fi
-
}
-
-
addRegularFeed () {
-
startKDEProgram akregator 30
-
dcop akregator AkregatorIface addFeedsToGroup '[' "$1" ']' Imported
-
kdialog –msgbox "news feed added to akregator"
-
}
-
-
addPodcastFeed () {
-
startKDEProgram amarok 30
-
dcop amarok playlistbrowser addPodcast "$1"
-
kdialog –msgbox "podcast added to amarok"
-
}
-
-
main "$@"
save this little script in /usr/bin/feeds, with the filename akadd, then close your editor and go back to the command prompt. CD to /usr/bin/feeds and type:
sudo chmod 755 akadd
Now you have to tell firefox where to find this little gem. To do this, just click on the RSS icon in the address bar and select /usr/bin/feeds/akadd. You should be up and running!
NOTE:
The original akadd script was written by Mathew Gates, and can be found here.
The fix to make it useful with Firefox 3.0 Beta was written by a French student at Linux tips, and can be seen here.
The reason my version is longer is because i really did want podcasts to go straight to Amarock, and I like the dialogs ;) Both versions work, I simply modified the longer version
And the best shared hosting comany is…
It’s not pretty when you’re hosting company fails to deliver. It’s even less pretty when your server goes down unexpectedly. Kaushal Sheth had this problem. One day out of the blue, he (and I’m only assuming “he” here.) simply didn’t have any web sites. It’s happened to most of us. Heck, it happened to me about a week ago!
Most of us will simply groan and bear it, Kaushal did something about it. He researched shared hosts from top ten lists all over the Internet and came up with his very own guide to the best web hosting companies. Each of these sites has a 99.9% uptime guarantee and redundant server facilities at extremely reasonable prices.
My hat is off to Kaushal. It takes a lot of wok to research hosting companies in today’s market. In fact, it was so much of a bother for me that I just went over to a VPS server, but that’s just me. If you’re still in the market for a shared hosting plan that has a radical transfer rate and a low cost, check out his list, I’m sure you’ll be happy you did.
A few pet peeves with WordPress 2.5
Please keep in mind that these are just my opinions and that the behavior I’m experiencing may be due to my server configuration, but there are a few things about the new WordPress Admin panel that just really annoy me.
- I don’t mind fixed width layouts but please, if you’re going to use fixed widths, center it, and keep everything in the layout the same width. There’s nothing more annoying to me than a variable width header and a fixed width, left aligned body. Make it consistent!
- I don’t know if this happens to you, but If I’m writing a very long post or one that I’ve had to walk away from for a while, I end up with multiple drafts of that post, all with different Post ID’s. At what point did the software decide that I’d started over or created a new post. How many drafts will I have to delete when I’m done typing this, and why should I have to. I think that section of the codebase is still a bit buggy.
- This one I’m pretty sure has to do with the fact that I’m running Linux, but it’s annoying nonetheless. Every so often the links on the write page simply don’t do anything. Apparently something happens that times out the Ajax connection or something. I have not been able to come up with a reproducible pattern, so I’m not sure if there is a trigger for it.
- The media uploader…. Ugh! I’ve given up trying to sort anything out with that and just hit “save all changes”, then go to the gallery and insert whatever I need inserted…
Well, that’s it for the rant session. I’m off to do more work in 2.5 and get the rest of my sites upgraded.

