convert -draw “rectangle x0 y0 x1 y1″ -fill none -stroke red -strokewidth 5
April 7, 2009
February 6, 2009
Create an iso from a directory
genisoimage -R -r -J -joliet-long --hide-rr-moved -iso-level 4 -V "Label" -o label_name.iso /tmp/directoryToSave
January 9, 2009
Install VMWare on Ubuntu
At first install those package:
apt-get install linux-headers-`uname -r` libx11-6 libx11-dev xspecs libxtst6 psmisc build-essential
Then download binaries on http://www.vmware.com/download/server/ (server & mui tgz source).
During the download, get a license number (http://register.vmware.com/content/registration.html) it’s totally free!
If you use kernel 2.6.27 please launch:
wget -c http://www.insecure.ws/warehouse/vmware-update-2.6.27-5.5.7-2.tar.gz
Then launch ./vmware-install.pl on each directory (update&mui or install&mui).
At the end of the mui installation you will get a starting failed message, to correct this bug please change in /etc/init.d/httpd.vmware file:
start)
vmware_exec "Starting httpd.vmware:" vmware_start_httpd
;;
stop)
vmware_exec "Shutting down http.vmware: " vmware_stop_httpd
;;
by
start)
if [ ! -d /var/run/vmware/httpd ]
then
echo "Directory: var/run/vmware/httpd Not found. Creating it."
mkdir /var/run/vmware/httpd
echo "Setting user and group ownership to: User: www-data, Group: nogroup"
chown www-data:nogroup /var/run/vmware/httpd
echo "Setting directory permissions to: RWX------ (700)"
chmod 700 /var/run/vmware/httpd
fi
echo "Starting httpd.vmware:"
vmware_start_httpd
;;
stop)
echo "Shutting down http.vmware: "
vmware_stop_httpd
;;
If you use Intrepid version and can’t launch vmware console please dl patch available at this page: http://www.monarialx.it/en/vmwareserver
December 24, 2008
Add a password access to a directory of your website
At first you need to create a file containing your password
htpasswd -c /var/www/itbdc/.htpasswd itbdc
Then create a file in your website: /var/www/itbdc/.htaccess
AuthType Basic AuthUserFile /var/www/itbdc/.htpasswd AuthGroupFile /dev/null AuthName EnterPassword require user itbdc require valid-user
Then edit your httpd.conf and check those two lines:
AccessFileName .htaccess
<Directory>
[...]
AllowOverride All
[...]
</Directory>
/etc/init.d/httpd restart
November 18, 2008
How to drop oracle database
shutdown abort; startup mount exclusive restrict; drop database; exit
Drop all tables in a tablespace
select ‘drop table ‘, table_name, ‘cascade constraints \;’ from user_tables;
November 17, 2008
How to insert a character in a delimited chain
echo “e_ff_0123_1″ | awk -F_ ‘{print $1″_”$2″_”$3″_0″$4}’