Archive for May, 2006

Useful free online tool – characters to ASCII HTML code

Problem You want to convert charactes to ASCII codes. Solution Free online tool, converts entered characters into the equivalent ASCII codes,as usable with HTML.The output can be used directly on web pages, so useful where special characters are required.The article that shows the Perl code for this tool is Example Reference

Useful Perl script – convert text to ascii

Problem You want to convert text to ascii values. Solution Perl script to convert standard input to ascii values, useful with web code.You can take the output and insert directly into HTML pages.#!/usr/bin/perlwhile(sysread(STDIN,$a,1)) {$c=ord($a);if($c==10) { print “\n”; } else { print “&#$c;”; }}exit(0);__END__ Example Here is a screen shot: Reference Now give the tool a [...]

Useful Perl online free tool to tripledes encrypt

Problem You want to generate encrypted cipher text for a given string, using tripleDES algorithm. Solution Free online tool, enter your password, then enter your text and select encrypt.The resulting text is tripleDES encrypted and base64 encoded, so it can be shared.The password will need to be shared once, maybe by phone or separate email. [...]

Switch to a different user in MS Windows / DOS

Su to other id (Then just run explorer and browse to directory) runas /user:USERID@xxx c:\winnt\system32\cmd.exe Where userid is the USER you wish to change to. For example Admin. xxx represents the hostname of the box or domain. You can also just use local, if changing to user on the same box, like this – for [...]

Setting file permissions from command line in windows

Here are the commands to modify MS Windows/DOS files and directories. Display file permissions. Replace filename with your file name. > cacls filename …\filename NT AUTHORITY\SYSTEM:F PCxxxxxxxxxxxx\Admin:F Modify permissions. Here we are granting full access to the user, replace user with desired user name. > cacls filename /E /G user:F processed file: C:\…\filename Here we [...]

Useful PHP tool to create an image with superimposed text

Problem You want to create an image text label. Solution Use GD library that can be built-in to PHP (see Example). Or just use my free on-line tool to create it. Example Code is here Reference Following on from the code , created a tool that uses that code.You can use this to generate black [...]

ssh-keygen syntax to create .ssh dirs and add an initial key

ssh-keygen -t dsa -b 1024 [ -c comment ]

MySQL backup db script

Problem You want to back up your mysql database. Solution This script is good for backups, as it will generate a dump – zipped and as the day of the week is used (in the backup file name), automatically rolls every 7 days.Run it daily or every other day. If you want a months worth, [...]