Search This Blog

Tuesday, August 23, 2011

How to increase upload file size of wordpress in Ubuntu

  1. Login as a root
  2. Go to /etc/php5/apache2
  3. Open php.ini and add the following two lines
    • upload_max_filesize = 64M; 
    • post_max_size = 32M;

Make sure that you added semi-colon at the end of each line.

How to includepdf files to SmartNotebook

I have landscape pdf files for teaching.  Here is steps to include the pdf file into SmartNotbook software.

1. Open a pdf file (landscape)
2. Rotate all the pages 180 degrees, so upside down.
3. Print the pdf to "SmartNotebook Document Writer" printer driver.
4. Once the pdf file is converted, it will be automatically loaded to SmartNotebook software in a correct way. Otherwise you have to rotate each page after loading.

Monday, August 22, 2011

The simplest way to print text and pdf files through ssh

If you want to print "b.pdf" to a remote Linux box connected to a printer, then

$ cat  b.pdf   |   ssh "lp -"

A script can be easier to use

cat $1 |  ssh "lp -"

Here is a better guide:

Saturday, August 20, 2011

Your PHP installation appears to be missing the MySQL extension which is required.

Here is how to solve the message:
"Your PHP installation appears to be missing the MySQL extension which is required."

prompt> sudo apt-get install php5-mysql

Monday, August 15, 2011

Useful pbs tutorial

In a pbs script for qsub,

echo ${JOB_ID}

How to disable blinking cursor of gnome terminal of Ubuntu 11.04

gconftool-2 -s /apps/gnome-terminal/profiles/Default/cursor_blink_mode -t string off


Saturday, August 13, 2011

splitting vim editor windows horizontally

  • Press :split to split horizontally the currently edited file into two Vi editor windows.

  • Press :split file2 to split the Vi editor windows horizontally. The upper Vi editor windows access to file2 while the bottom Vi editor windows access to the currently edited file.

  • While in splitting mode, press CTRL+WW to switch between split Vi editor window. Copy between files made even easier in split Vi editor windows - just copy the block of lines and press CTRL+WW switching to target file then press p to paste the copied lines.

  • To close splitted  windows press :q.



    Blog Archive