Stuff…

I know I will forget.

Stuff… header image 4

Entries Tagged as 'Coding'

Default a port on old Cisco 3548

June 20th, 2010 · No Comments

I wanted to default the configuration of a number of ports on an old Cisco 3548. The latest version of IOS support on this system does not support the range command, so, had to manually run a small script (bash 1 liner on linux) and paste in the contents:
$ for i in `seq 40 [...]

[Read more →]

Tags: Cisco · Coding · Networking · One Liners · Uncategorized

MySQL tuning script

March 4th, 2010 · No Comments

This looks like a useful mysql tuning script:

http://blog.mysqltuner.com/

Otherwise the mysql.com pages are good for tuning:

http://dev.mysql.com/doc/refman/5.0/en/optimization.html
http://dev.mysql.com/doc/refman/5.1/en/optimization.html

[Read more →]

Tags: Coding · MySQL

Online base64_decode function

February 4th, 2010 · No Comments

This site was useful when wanting to check some obfuscated PHP scripts.  Pesky spammers have a habit of using base64_decode in dodgy php scripts to try and stop you from finding out what they are doing/executing.
URL:
Online base64_decode() function – By Tools 4 Noobs. :-)

[Read more →]

Tags: Coding · Operating System

Plesk backup temporary file filling disk

February 10th, 2009 · No Comments

It appears that the Plesk backup utility (pleskbackup Linux) writes to a temporary file prior to moving it to the final destination you’ve specified on the command line.
ie. When running:
/usr/local/psa/bin/pleskbackup all /mnt/nfsshare/pleskbackup.bak
Plesk writes the whole backup file to the local disk in /var/lib/psa/dumps/tmp/:
# ls -lah /var/lib/psa/dumps/tmp/
total 1.9G
drwx—— 2 psaadm psaadm 4.0K 2009-02-09 18:38 .
drwxr-xr-x 3 [...]

[Read more →]

Tags: Coding · Control Panels · Linux · Windows

Quick CLI SMTP AUTH script to test authentication

February 9th, 2009 · No Comments

I was getting a bit bored of manually testing SMTP AUTH details for people so wrote a quick little script in perl (with help of modules) to test.
#!/usr/bin/perl -w
use Net::SMTP_auth;
use Getopt::Std;
%options=();
getopts(“u:p:h:”,\%options);
my $_USAGE= <<END_USAGE;
test_auth.pl   -  Check SMTP authentication
Usage:   test_auth.pl -u user -p pass -h hostname
License: This software is released under the same terms as perl itself.
END_USAGE
die [...]

[Read more →]

Tags: Coding · Protocols · SMTP