Search Ali's Blog

Friday, July 31, 2009

Bring up Linux Apache Server & symbolic links access

I wanted to bring up an HTTP server on Red Hat 5.3 to browse a NFS directory and share it with my colleges. The basic configuration went very easily, however, accessing the soft links was a nightmare! so I would like share the solution here to save time for other people who face the same problem. I found a lot of articles about this, this one was great. Basically, you need to edit /etc/httpd/conf/httpd.conf and include this line under the "Directory" XML element of the directory that includes the symbolic links you want to enable:
Options FollowSymLinks
However, it was not enough for my case, and my problem was SElinux! once I disabled it, everything worked like a charm. To control (disable) SElinux follow instructions at this link. Basically, to disable SElinux temporarily, run:
echo 0 > /selinux/enforce


Thanks for the people who documented their troubleshooting and helped solving the problem.


P.S.
To set your web server for easy file access:
- comment out all lines in /etc/httpd/conf.d/welcome.conf
- edit /etc/init.d/httpd.conf
- echo 0 > /selinux/enforce
- Modify the line "DocumentRoot /var/www/html" to point to your path
- Modify the line "Directory /var/www/html" to point to your path
- chkconfig httpd on
- service httpd restart
- Got to any host any browse http://server-ip

Saturday, July 25, 2009

How to beat "How fast can you type A to Z?"










I wrote this simple script to solve "How fast can you type A to Z?" app in facebook. To get 0.00 seconds score (see image) run this small application and follow the instructions.
- Source code is downloadable from here (edit with any editor like vim/notepad, run with AutoIt)
- Enjoy and share

Source code:
; AutoIt Version: 1.0
; Language: English
; Platform: Win9x/NT

; Author: Ali Ayoub
;
; Script Function:
; solves a-z game i
n FB within 0.00 seconds :P
; tested on FF 3.5.1 and IE 0.8

$answer = MsgBox(4, "How Fast Can You Type A-Z? on Facebook - by Ali Ayoub", _
"1. Open the web page 'How Fast Can You Type A-Z?'" & @CR & _
"2. Press 'Yes' on this window" & @CR & _
"3. Press 'I am ready
' on the app window" & @CR & @CR & _
"Kapeesh?")
If $answer = 7 Then
MsgBox(0, "How Fast Can You Type A-Z? on Facebook", "Looser! Bye.")
Exit
EndIf

WinWaitActive("How Fast Can You Type A-Z? on Facebook")

Opt("SendKeyDelay", 0)
Opt("SendKeyDownDelay", 0.5)
$a2z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Send($a2z)
Send($a2z)
Send($a2z)
Send($a2z)
Send($a2z)
MsgBox(0, "How Fast Can
You Type A-Z? on Facebook - done", "Damn, this was so fast!")