Creating an SSL key, CSR and self-signed cert

cd /etc/pki/tls cd private openssl genrsa -des3 -out `hostname`.key 1024 # password: whatever you want # TO MAKE IT HAVE NO PASSPHRASE (optional): cp `hostname`.key `hostname`.key.orig openssl rsa -in `hostname`.key.orig -out `hostname`.key # MAKE THE CSR cd ../csr openssl req -new -key ../private/`hostname`.key -out `hostname`.csr # answer the questions # MAKE THE SELF-SIGNED CERT: cd … Read moreCreating an SSL key, CSR and self-signed cert

CVS: recursively add files

Have you ever worked in a CVS module, added a deep tree of directories and files and needed to add them to CVS. If you have, you may have had to go through a painful process of adding one dir at a time, then all the files in that dir, then repeat until you’ve done all the dirs. I have a solution for that:

Just run this over and over again, until all files are added:

Read moreCVS: recursively add files

Perl, Extended Find and Replace

Use with caution, this will not make backups:

search="searchRegExp"
replace="replaceStr"
egrep -lri --exclude="Entries" --exclude="*.gif" --exclude="*.WAV" --exclude="*.wav" --exclude="*.zip"  "$search" * | xargs perl -pi -e "s/$search/$replace/gi"

the “gi” option means globally, case-insensitive, so take the “i” off if you want it to be case-sensative.

If you want to make backup files, replace “perl -pi” with “perl -pi.bak”

Read morePerl, Extended Find and Replace

Using XAJAX to autocomplete emails from address book

PostPosted: Sat Sep 10, 2005 6:00 pm Post subject: Reply with quote

Imagine that you are supposed to type in an email address into a form. You would typically type an email address that may be stored in your address book from a MySQL database. There are too many emails in your address book to pre-populate into a list on the page. Instead you want to start typing and have addresses that match what you’ve typed so far appear in a drop down. We will fetch the emails to populate the drop down from the server, on the fly, in the background.

Read moreUsing XAJAX to autocomplete emails from address book