Category: Misc

Perl – Sort associative array by value

Here’s an alpha sort of the values of the associative array named “myarray”:

And here’s the same sort numerically:

And if you want numeric descending:

Of course don’t forget how to sort keys:

And a numerical sort of keys:

Read More »

MS-SQL 2000 : Truncate transaction log

Execute the following commands:

This will reduce the transaction log for the “pubs” database to 2MB.

Read More »

LFTP mirror script

Here’s a very handy script to mirror a site via ftp with lftp:

And here’s a mirror in the opposite direction:

Read More »

Making Plesk More PCI Complient

Here’s a great article that describes some of the things that can be done to make a plesk server pass PCI compliance scans: http://www.linux-advocacy.org/web-servers/making-plesk-more-pci-compliant

Read More »

Exclude Directroy From CPanel Backup

Create cpbackup-exclude.conf in the user’s home directory (/home/user-id) to exclude files from a cPanel backup. This file is only used if you make a complete site back up from cPanel. Here are the basic rules for the content of the file: Each item to skip must be on it’s only line in the file. Directories should not have a trailing slash. Each entry must have the full path to the file or directory.

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.