Archive for the 'Uncategorized' Category

Increase or extend phpmyadmin session/login time in Ubuntu Karmic Koala 9.10

To increase the loging time of phpmyadmin edit :
/etc/phpmyadmin/config.inc.php
Add the following line :

$cfg['LoginCookieValidity'] = 3600 * 9;

To make the login time 9 hours.
Along with this also check session.gc_maxlifetime in php.in to be higher than or equal to this value. Otherwise session time will be the lower of the two values.

Print margins in Firefox Ubuntu Karmic Koala

To change print margins in Firefox in Ubuntu :
1. Open a new tab and type about:config in the Url and hit enter.
2. In filter enter margin.
3. For all terms which looks similar to print_margin_bottom , print_margin_top , print_unwritable_margin_bottom , print_extra_margin and so on, double click them and enter value of 0 or 0.0

Url encoded forward slash in MVC or codeignitor app urls

When using PATH_INFO , the urls of codeignitor apps or your custom MVC looks like this

index.php/controlller/method/param1/param2
or
/controlller/method/param1/param2

Now if the parameters contain a forward slash then you would urlencode it as :

index.php/controlller/method/par%2Fam1/param2

Enable mod expires on Ubuntu 9.10 Karmic Koala

To enable mod expires on ubuntu karmic koala :

sudo a2enmod headers
sudo a2enmod expires
sudo /etc/init.d/apache2 restart

If you internal server error or ExpiresActive not allowed here

Zero Seller protection on Scriptlance

Scriptlance is a popular freelance portal where buyers and sellers meet together to work on projects.
Scriptlance has the escrow system which aims at providing sellers with protection against frauds by clients.

Useful ffmpeg commands on Ubuntu 9.10 Karmic Koala

FFmpeg can be installed easily from synaptic

sudo apt-get install ffmpeg

Some useful ffmpeg commands :
1. convert mpeg to flv

ffmpeg -i /path/to/movie.mpeg -ar 22050 -ab 32 -f flv -b 500000 -s 480×360 -y movie.flv

2. convert mp3 to flv

ffmpeg -i /path/to/track.mp3 -f mp3 -ab 64000 -ar 22050 myfile.mp3

3. convert mpeg to flv with mp3

ffmpeg -i /path/to/movie.mpeg -ar 22050 [...]

Access other partitions as writable from Dolphin KDE in Ubuntu

To access other partitions as writable execute the command.

sudo chmod -Rv a+w /media/disk

where directory /media/disk is the path to your partition.

Moneybookers as a Paypal alternative for freelancers

Recently Paypal has faced some issues with RBI which has resulted in withdrawals being reversed etc. Moneybookers is a service similar to Paypal. Moneybookers is available as a withdrawal option in Scriptlance , Getafreelancer , Odesk.

Install SPICE on Ubuntu 9.10 64bit Karmic Koala

SPICE (Simulation Program with Integrated Circuit Emphasis) is a analog circuit simulator.
To install on Ubuntu get the .deb files from :
http://sourceforge.net/projects/ngspice/files/
Look for 17.binary.64bit directory.

Install xdebug profiler on Ubuntu 9.10 Karmic Koala

Install the following :

sudo apt-get install php5-dev
sudo apt-get install php5-xdebug

Find where the xdebug.so file is :

martin@martin-dev:/$ find / -name ‘xdebug.so’ 2> /dev/null
/usr/lib/php5/20060613/xdebug.so