Archive for the ‘tip’ Category

Quick Tip: Finding cPanel Logs

Sunday, September 20th, 2009

Need to find those FTP logs? Quick overview of the various log files typically available on a web server (with particular reference to cPanel) …

cPanel Logs – A detailed view

Quick Tip: CSS Sprite Generator

Thursday, April 23rd, 2009

This is a cool CSS Sprite Generator:
http://www.csssprites.com/

Upload your image and an alternative state and it will output the combined image with the background position values. Nice.

Quick Tip: Find the location of exim log files …

Tuesday, March 31st, 2009

Find the path of exim log files …

exim -bP log_file_path

Tip for Setting up Apache, MySQL and PHP on Vista

Monday, March 16th, 2009

Just setup a PHP/MySQL development server on my Vista-based laptop.

Here is a good rundown of setting up a VAMP (Vista, Apache, MySQL, PHP) server from Devshed:
Creating a VAMP

The other thing to know, which this article skipped, is that you should run your text editor as administrator when editing the config files. If you don’t do this you won’t be editing the correct file (only your Users version of it which isn’t actually used by the system).

Quick Tip: Find PHP files changed in the last day

Thursday, February 26th, 2009

Here is a example of how to use the Find command to find PHP files changed in a servers home directory in the last day …

find /home -mtime -1 -name *.php

Pretty easy to modify this to give a different time period, search a different path, or find different kinds of files.

Great Resource: Unofficial Google Analytics Manual

Monday, February 16th, 2009

Fresh off my news reader, from Bryan Eisenberg of FutureNow, is a great collection of links and resources for setting up and making the most of Google Analytics.

The Missing Google Analytics Manual

Bryan is probably the most influential expert on Conversion Rate Marketing.

A great resource.

Tip: Easy Export of Nucleus CMS Posts to import into Wordpress

Thursday, January 29th, 2009

I recently had to migrate blog posts in a Nucleus CMS-based blog to a Wordpress blog. Nothing against Nucleus which served a purpose for a long time and is still a really powerful piece of software. The migration is more to do with my experience working with Wordpres now than the quality of Nucleus. Anyway … I did a quick hunt for ways to migrate, which included some random code that referenced old versions of Nucleus and WP. I didn’t even bother with this. There is a much faster way.

The easy (and fast) solution proved to be modifying the Nucleus RSS feed so that it exports all the blog posts in full. These can then be imported into Wordpress.

Steps in brief (this might be different depending on your Nucleus version):

  1. Edit the skin for xmlrss2 in Nucleus. Find this (or similar) <%blog(xmlrss2,10)%> and change it to <%blog(xmlrss2,1000)%> where the second number is larger than the number of posts in your blog.
  2. Edit the template for xmlrss2 in Nucleus. It will probably look something like this:
    <item><title><%syndicate_title%></title>
     <link><%blogurl%>index.php?itemid=<%itemid%></link>
    <description><%syndicate_description%></description>
     <category><%category%></category>
     <pubDate><%date(rfc822)%></pubDate>
    </item>

    Change it to:

    <item>
     <title><%syndicate_title%></title>
     <link><%blogurl%>index.php?itemid=<%itemid%></link>
    <content:encoded><![CDATA[<%body%>
    ]]></content:encoded>
     <category><%category%></category>
     <pubDate><%date(rfc822)%></pubDate>
    </item>
  3. Open the Nucleus RSS feed in a browser (it should be really long and include the content of all your blog posts). Save the source (nucleusexport.xml for example).
  4. Reset the changes to the Nucleus templates and skins above so your feed is back to normal.
  5. Import the RSS feed into your Wordpress site (this used to be under the Manage tab, it is under Tools now).

Note: this won’t migrate comments and maybe other stuff that is important to you. This is purely the post content.

Send SMS notifications from your Web Application

Wednesday, November 26th, 2008

A few years ago I started using Clickatell as a way to send SMS messages from different applications I built. Getting a message to notify you of particular events (”you received an order”, “something isn’t working right”) allows you to respond in a timely manner.

I have one web-based application that monitors various websites I work on and I get a downtime notification via SMS any time a site is down. I have also integrated SMS with osCommerce to send order notifications including the contents of the order. This is great for monitoring a low volume sideline store. There are lots of applications for this of course.

I have used Aleksandar Markovic’s Clickatell SMS API for a number of years. It supports CURL and fopen for the HTTP request and is very easy to integrate into your application.

GZIP compression not supported by Wordpress 2.5+ (and what to do)

Tuesday, November 25th, 2008

I noticed that the GZIP compression option was no longer there in Wordpress after version 2.5. This is recommended to be performed by the server now using mod_deflate.

If you don’t have access to mod_deflate, i.e. if you are on a uncooperative shared host, you can use this method using .htaccess …
Speed Up Your Blog Using ZLIB

If that doesn’t work you may be on a phpSuExec server. Create a file called php.ini in the root of your Wordpress install with the following contents …

zlib.output_compression = On

You can test here:
http://www.gidnetwork.com/tools/gzip-test.php

Fast Prototype Primer

Friday, September 19th, 2008

A couple of links related to the Javascript library Prototype:
Quick Guide to Prototype
Developer Notes for prototype.js