The Examples

Have you ever integrated a third party library into your project? You got a big manual full of nice documentation. At the end there was a thin appendix of examples. Which of the two did you read? The examples of course! That’s what the unit tests are! They are the most useful part of the documentation. They are the living examples of how to use the code. They are design documents that are hideously detailed, utterly unambiguous, so formal that they execute, and they cannot get out of sync with the production code.

sumber : http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd

 

VNC on Slitaz

Symlink to SliTaz fonts and rgb.txt
Open terminal,su, Password: root
mkdir -p /usr/X11R6/lib/X11/fonts
ln -s /usr/share/fonts/X11/misc /usr/X11R6/lib/X11/fonts
ln -s /usr/share/X11/rgb.txt /usr/X11R6/lib/X11

As regular user start vnc server
vncserver
Enter password required for client connection.
tux@slitaz:~$ vncserver
xauth: /home/tux/.Xauthority not writable, changes will be ignored
xauth: error in locking authority file /home/tux/.Xauthority
Couldn’t start Xvnc; trying default font path.
Please set correct fontPath in the vncserver script.

New ‘X’ desktop is slitaz:1

Starting applications specified in /home/tux/.vnc/xstartup
Log file is /home/tux/.vnc/slitaz:1.log

Verify vncserver is running:
tux@slitaz:~$ pgrep -l Xvnc
879 Xvnc
vncserver is working regardless of error messages

As regular user stop vnc server:
vncserver -kill slitaz:1

Configure xstartup
leafpad /home/tux/.vnc/xstartup

#!/bin/sh
openbox-session &
pcmanfm -d &

sumber : http://forum.slitaz.org/topic/problems-with-tightvnc

public_html

In order to enable the user-specific public_html directory open up a terminal and switch to the apache module config directory:

cd /etc/apache2/mods-enabled

If you list all the files inside this directory you’ll notice that all of them are actually symbolic links. To enable mod_userdir, which is the module you’re interested in, you’ll have to create two symlinks to the relevant files:

sudo ln -s ../mods-available/userdir.load

sudo ln -s ../mods-available/userdir.conf

All done! Now restart Apache via:

sudo apache2ctl restart

We can now access the web applications stored in our /home/username/public_html directory via http://localhost/~username/

source : http://heriman.wordpress.com/2008/08/05/enabling-apache-user-home-public_html-directory-in-ubuntu

Menginstall JDK pada Ubuntu secara manual

Untuk menginstall JavaSE JDK di Ubuntu, terlebih dahulu download jdk yang diinginkan di http://www.oracle.com/technetwork/java/javase/downloads/index.html. Pilih file bin untuk di install di Ubuntu. Setelah filenya selesai didownload rubah file permisionnya dengan

sudo chmod a+x [FILE_JDK].bin

Copy file tersebut folder yang inginkan, semisal ke /usr/lib/local/, kemudian jalankan dengan perintah

./[FILE_JDK].bin

yang akan menghasilkan folder instalasi jdk yang akan kita sebut dengan [JAVA_HOME]. Supaya dapat dikenali Ubuntu sebagai suatu library, perlu dibuat link ke [JAVA_HOME]/bin/java dengan perintah

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/local/[JAVA_HOME]/bin/java" 0
sudo update-alternatives --set "/usr/bin/java" "/usr/lib/local/[JAVA_HOME]/bin/java"

dan jangan lupa untuk menambahkan

JAVA_HOME=/usr/lib/local/[JAVA_HOME]
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH

di file .bashrc pada /home/[USER]/

Oracle listener

Jika menginstall oracle database stadard (bukan XE), listenernya harus di bind ke 0.0.0.0 secara manual di Oracle Net Manager. Tambahkan ip 0.0.0.0 untuk membind secara otomatis IP pada server ke listener oracle.

Shortcut Ubuntu yang bentrok dengan IntelliJ IDEA

shortcut yang saya sering pakai di IntelliJ IDEA yang bentrok dengan Ubuntu :
via CompizConfig Settings

ctrl + alt + Left Arrow
ctrl + alt + Right Arrow
alt + F8

via Keyboard Shortcut

ctrl + alt + L

Bagaimana menginstall CompizConfig

sudo apt-get install compizconfig-settings-manager