Friday, January 27, 2012

Hide PHP on Apache and Apache itself

Hide PHP on Apache and Apache itself:

In httpd.conf
-------------
ServerName localhost
# ...
# Minimize 'Server' header information
ServerTokens Prod
# Disable server signature on server generated pages
ServerSignature Off
# ...
# Set default file type to PHP
DefaultType application/x-httpd-php
# ...

php.ini
------------
; ...
expose_php = Off
; ...

Sunday, January 22, 2012

How to install Eclipse 3.7 on Ubuntu 11.04


The Eclipse packages in Ubuntu are are very out of date. The latest version in the Ubuntu repos is 3.5.2 where as the latest version of Eclipse is 3.7. I’m posting this because Ubuntu 11.04 uses the new Unity desktop which uses overlay-scrollbars (scrolls bars that are hidden until you hover over them). For some reason Eclipse 5.3.2 doesn’t like to play nice with the overlay scrollbars, and I’d rather use the newest version anyways. With Eclipse, you can just download the tar.gz file from eclipse.org and run it no problem, but I like set things up in a cleaner fashion, so here’s how I did it.

1) Download Eclipse. I got eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
2) Extract it
tar zxvf eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz
Or just be lazy and Right Click > Extract Here
3) Move to /opt/ folder
sudo mv -f eclipse /opt/
cd /opt/
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
4) Create an eclipse executable in your path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo nano /usr/bin/eclipse
copy this into nano
#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*
save the file (^O = Ctrl+o) and exit nano (^X = Ctrl+x)
5) Create a gnome menu item
sudo nano /usr/share/applications/eclipse.desktop
copy this into nano
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
save and exit nano
6) Launch Eclipse for the first time
/opt/eclipse/eclipse -clean &

7) The update Site
http://download.eclipse.org/releases/indigo/

xfce4-screenshooter keyboard shortcut

sh -c 'xfce4-screenshooter --fullscreen --save "$HOME/Pictures/Screenshots/Screenshot_$(date +%Y-%m-%d_%H:%M:%S).png"' s...