Archive for the ‘linux’ Category

mount hfsplus (mac os file system) under Debian linux

Wednesday, October 1st, 2008

Have an external hard disk with hfsplus or hfs+ partition on it? This is how you can mount it under linux (specifically, Debian) :

in os x :

  • disable journaling in the partition/external hdd in disk utility or use run the command “diskutil disableJournal /dev/disk1s1″ in terminal.

in linux :

  • apt-get install hfs*
  • mount -t hfsplus -o rw /dev/sdb1 /mnt/extdisk

Voila !!!

bash script accept parameter when called

Monday, September 29th, 2008

example :

#!/bin/bash

echo this is the first parameter supplied $1, and this is script name is $0

Drawing shapes in Gimp

Thursday, September 25th, 2008

Ever wonder why Gimp does not have shapes drawing functions? It has, just need to adapt to its way of working.

1. choose the shape,

2. choose the border color,

3.draw the shape then click Edit –> Stroke Selection … and press okay

Voila !

Debian - distribution upgrade problem

Tuesday, August 26th, 2008

Typically, by running the below command would upgrade the distribution :

  1. apt-get update
  2. apt-get upgrade
  3. apt-get dist-upgrade

Occasionally there would be errors like “The following packages have been kept back”. A quick solution to it is :

  1. apt-get upgrade
  2. apt-get dist-upgrade
  3. apt-get install <package, not packages kept back>

then :

apt-get upgrade

apt-get dist-upgrade

(again …)

HAPPY PATCHING !!!

Tips of the Day: phpinfo(), Code That Shouldn’t Show To Public

Tuesday, July 22nd, 2008

I notice that most of the programmer love to do phpinfo() on info.php, info.html page. But they do not know that such information may vulnerable to attacker. Some even have it as apache’s default DocumentRoot.

If you want like to use phpinfo(), it’s advice to use a random name for php filename. For example infoxxxxx.php, noinfo123123aa.php, testinfo123213.php. Beside that, you can remove the code immediately after you got what you want.