Image Manipulation

rename all images in the current folder based on creation date

exiftool '-filename<CreateDate' -d %y%m%d_%H%M%S%%-c.%%le -r -ext jpg .

resize multiple jpg files

emogrify -resize "50%" *.jpg
...Read More »

Updating openssl on RedHat 5.3

With the new heartbleed virus we need to update openssl.. and cleanup the un-needed 32bit

[root@ora01 ~]# yum list installed|grep openssl
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
openssl.i686 0.9.8e-7.el5 installedRead More »

Random Apache shtuff

[root@xxxxxxx ~]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: Syntax error on line 292 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory [FAILED]

This is due to selinux being enforced. Edit /etc/sysconfig/selinux, change to disabled and reboot.

...Read More »

Change resolution of boot screen and console

in /etc/default/grub add the following two lines


and then run update-grub

...Read More »

OSX commands

flush dns

dscacheutil -flushcache
...Read More »

Perl commands

simple one liner password generator. thanks to

perl -le 'print map { (a..z,A..Z,0..9)[rand 62] } 0..pop' 8
...Read More »

VI commands

search and replace a path with a variable

we want to change the following text





...Read More »

Linux commands

These are commands I find useful..

get a list of all installed updates

rpm -qa --qf '%{INSTALLTIME} %-40{NAME} %{INSTALLTIME:date}\n' | sort -n

get all CVE’s from all packages

for pkg in `rpm -qaRead More »

Configure command for Moodle 2.0

./configure --with-apxs2=/usr/sbin/apxs --with-config-file-path=/etc/php --with-gd --with-zlib --enable-sockets --with-curl --with-xmlrpc --with-openssl --enable-mbstring
...Read More »