Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Linux Ask!

Sep 182011
 

Combine multiple images into a single image with ImageMagick

Answer:

With the powerful ImageMagick program, we can easily handle common graphics tasks using command only.

For example, to combine multiple images into a single image, we need just one command:

# convert file1.jpg file2.jpg file3.jpg +append -quality 90 'output.jpg'

The above command (file1.jpg file2.jpg file3.jpg) into the file output.jpg with quality set to 90.

Sep 162011
 

Show the current user in MySQL

Answer:

Like in the shell, we can execute the command whoami to find out the current user name, we can use the function CURRENT_USER();

E.g.

mysql> SELECT CURRENT_USER();
+----------------+
| CURRENT_USER() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
Sep 142011
 

Install NodeJS in Linux

Answer:

In order to install NodeJS in Linux, the recommended way is compile from source and install it.

# wget http://nodejs.org/dist/node-v0.4.11.tar.gz
# tar zxf node-v0.4.11.tar.gz
# cd node-v0.4.11
# ./configure
# sudo make && make install

Now you can type node to enter the node's REPL