Category: Reliable Penguin

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 »

Remote access via ssh with RedHat Rescue Disk

Insert Rescue Disk and boot server. At the first prompt type “linux rescue” and hit enter. Follow boot disk prompts to start networking. Enter the system’s ip address, netmask, gateway and name server. Continue with prompts until the root partition is mounted and you get a command prompt. Verify network configuration with ifconfig and route. Use the following commands to start sshd:

You should now be able to SSH into the server.

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 »

Categories

Get a free consultation from Reliable Penguin

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