2011/03/25

Installing python 26 + sqlalchemy on centos

Turns out there is a very very very easy . Just use the repo for fedora on the redhat site.

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
yum install python26 python26-devel python26-distribute python26-tools
easy_install-2.6 SQLAlchemy

test it via
python2.6
>>>import sqlalchemy
>>>sqlalchemy.__version__

2011/03/22

Random password in CLI

Just a small script so that we can generate passwords from the command line

NUMPASS=10
if [[ "$1" =~ ^[0-9]+$ ]] ; then
NUMPASS=$1
fi
echo "Spicy salt $(date)" | md5sum | sed "s/\(.\{$NUMPASS\}\).*/\1/"