CartMetrix - Do you know yours?

6/27/2007

Bookmarklet For emailURL.com and anonURL.com

I created the two URL shortening services: emailURL.com and anonURL.com several years ago as a side project to support another side project. It’s a great service that allows you to create short URLs that don’t break in email messages. How many times has someone replied to an email saying the link you provided doesn’t work. In most cases its a matter of manually copying and pasting the parts of the link that were broken by the word wrapping. With emailURL.com its simple to create a short url that works everywhere.

I use these services every day but I never made it easy for someone else create shortened URLs. Today, I added a bookmarklet on both site’s home pages to facilitate usage.

To make it easy to integrate into other projects, I have built a SOAP API to call the create functions remotely. Stay tuned for more details after we complete beta testing.

Popularity: 12%

3/18/2007

Zencart Inventory Report Update v0.9.2

Feedback from users prompted me to add an extra column to the report display… the master category. The master_category_id is listed in the products table and is generally the category the product was originally created in (unless changed later). The report won’t show every category a product is listed in if the product has been linked to multiple categories.

Download ZenCart Inventory Report

Thanks to Ron for the donation to help out with these feature additions.

Popularity: 26%

3/14/2007

Quick and Dirty MySQL Backup Script

I previously posted a Quick and Dirty MySQL Backup snippet that has gotten a bit of traffic. It works well in a pinch, but it doesn’t have any features. I use it primarily as a safety backup when performing maintenance on a MySQL server.

Several of my clients have requested a script that they can use to do on demand one-off backups. I rolled the snippet up into a very quick-and-dirty MySQL backup.

Download mysql_quick_back.sh

Installation

  1. Copy mysql_quick_back.sh to a directory in your path (~/bin/ for me).
  2. Set execute bits with
    chmod 755 mysql_quick_back.sh
  3. Set MySQL user/pass, directory to save backups to and notification email in script configuration
    # START configure
    # MySQL user, needs SELECT privileges
    # Create a new user with these permissions!  More secure than using a user
    # with full permissions
    user=

    # MySQL password
    pass=

    # admin email address
    adminemail=

    # backup location without trailing slash
    # set to current directory
    backuppath=.
    # or set to your home directory
    #backuppath=/home/admin/db_backs
     

Usage

Simply execute the script

NOTE

For a full MySQL backup application, check out the original MySQL Backup by Peter Falkenberg Brown. MySQL Backup is robust enough to use as a daily backup. I use it on most of the servers I manage.

Popularity: 22%

3/12/2007

Wordpress Revision History Plugin

Editing a post is a necessity from time to time, especially with any type of coding related blog. I particularly like to keep older posts up to date with revised download links as new versions are released. This prevents a user following a link off of a search engine to an old post and downloading an old version of one of my pieces of code. Surprisingly, I could not find a Wordpress plugin to do just this. This tiny plugin allows you to attach timestamped revision tags to a post using the Wordpress metadata system.

For an example in action see the Post History heading after this post.

Installation

  1. Download and unzip wp_revision_history.zip
  2. Upload revision_history.php to your Wordpress wp-content/plugins/ directory.
  3. Add the following CSS to your stylesheet. Change CSS to match your site layout.
    #revision-date  {
            padding: 3px 5px 3px 12px;
            font-weight: bold;
            color: #333;
    }

    #revision       {
            padding: 2px 5px 8px 18px;
            color: #555;

    }

  4. Add the following snippet to your template where you want a post's revision
    history to display

    <?php if(function_exists('wp_has_history') && wp_has_history())   {  ?>
    <h3>Post History</h3>
    <div class="cmeta" style="bottom-margin: 20px;" id="history">
    <?php wp_history(); ?> 
    </div>
    <? } ?>

Usage

To add a revision tag to a post, add a new custom field named 'history' to the post. Set the custom field's value to the revision note text. Multiple revision tags may be made to the same post by adding more custom fields with the key 'history'. Each note will be automatically timestamped. The history listing will be sorted by the timestamp value.

Download Wordpress Revision History

Popularity: 27%

3/10/2007

ZenCart Inventory Report - Updated

Thanks to Ron for posting a bug back on the Zencart forums about my Zencart Inventory Report

Fixed… download… enjoy.

Popularity: 23%

2/26/2007

Versions.sh - Shell Script to Find Installed Versions of Major Server Daemons

I look at a lot of servers throughout the day. When taking a first look at a server it’s always helpful to know what versions of Apache, PHP and MySQL installed. I use Versions.sh to get the low down on one screen.

[root@servername root]# versions.sh
Linux servername 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 i686 i386 GNU/Linux

Redhat Version:
Red Hat Enterprise Linux ES release 3 (Taroon Update 4)

Apache:
Server version: Apache/2.0.46
Server built: Jul 8 2005 14:05:56
PHP 4.4.0 (cgi) (built: Jul 12 2005 02:09:00)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

MySQL:
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)

Security:
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0×0090701f
OpenSSL 0.9.7a Feb 19 2003

Download versions.sh

I usually check out ifconfig too for IP information. Any other information, just add at the bottom of the script.

Popularity: 17%

Next Page »


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It