Apache2 + userdir + php – Not working

I just configured a new webserver and wanted to use the UserDir option.
Enabling UserDir gives you the option of placing webfiles in a public_html folder in your home folder. You can access the webfiles through http://yourserver.com/~UserName/.

The problem i encountered was that .php files wouldnt show, they where just downloaded.

Solving the problem was easy, just open php5.conf in /etc/apache2/mods-enabled.

Edit it to replicate the listings below (uncomment the same lines in your config).

Now restart Apache2 with : sudo /etc/init.d/./apache2 restart , and you are good to go.

the Euclidean algorithm

Ever heard of the Euclidean algorithm??

From wikipedia:
In mathematics, the Euclidean algorithm[a] (also called Euclid’s algorithm) is an efficient method for computing the greatest common divisor (GCD) of two integers, also known as the greatest common factor (GCF) or highest common factor (HCF).

I have just written a short python program for finding the GCD.. Enjoy..

Backspace error in SSH sessions – acts as Delete key

In OSX 10.6.xx (Snow Leopard) users who use the Terminal application to SSH into remote servers might experience that the backspace key works as the delete key in some applications (VI, Nano, Pico etc) I have not heard of this happening in any other OS or application, so an easy way to fix this in Terminal configuration on your Mac.

Go to Terminal preferences, select the Advanced tab, and check “Delete sends Ctrl-H”. That’s all it takes to get the “delete” key to work correctly in all applications used in your SSH sessions.

 

 

Tweaking Ubuntu – Hidden settings

Ubuntu Tweak is a tool that lets you change hidden Ubuntu settings, for example: hide or change the splash screen, show or hide the Computer, Home, Trash, and Network icons, change Metacity, Nautilus, power management, and security settings, etc. Currently Ubuntu Tweak is available only for the Ubuntu GNOME desktop, i.e., it will not work on Kubuntu or Xubuntu.

Continue reading