Setup Local J2EE development environment @ eclipse in linux

First of all, you will need to download and install Eclipse IDE for Java EE Developers

Lets use Kepler version 64bits.

You can chose another

Extract the content of file to a folder.

STO v1.0

Zxcoders just realease the version 1.0 of the STO.

Smart Task Organizer is a web and mobile application that enables organize your tasks . " STO is another app for managing diary ? " NO! , the STO is useful for small tasks that do not have specific dates but that teem a particular importance and urgency . (mowing the lawn , washing the car , tidying the garage, ... ) All tasks will be added retrospectively intelligently arranged in order of execution , given its importance / urgency / facility . Briefly , it is this! You can start now to learn more about the app .

PHP Debugger

How to debug your PHP project

It is assumed that the server is installed locally to work (php apache mysql etc ...).

Get Eclipse from here

On Eclipse go to Run -> Debug Configurations
Click new configuration

new configurations image new configurations image

Folder: Server
*Name: php-debugger (can chose another name, of course! :) )
*PHP server - default PHP Web Server
*File: /newProject/index.php
Open configure...
*Debugger: xdebug
*base url: http://localhost
*local web root: /var/www/html/newProject
*new configurations image

Folder: Debugger
*Server Debuger --> XDebug

go to /var/www/html and create a new folder "newProject"

Create a PHP Project in eclipse (using, of course, the folder you created)

Create new file index.php with some code to text and set a breakpoint with double click on the left side of the code

Open php.ini
sudo gedit /etc/php5/apache2/php.ini
past the code

xdebug.remote_enable = On
new configurations image
save the file and exit
restart apache: sudo /etc/init.d/apache2 restart

new configurations image

Run, Debug as... , PHP web application

new configurations image

Will open a web browser inside eclipse


Email Web Crawler

This simple python script allow you to scan websites looking for email addresses.

In the begin, you have to set a seed url to have a initial point to scan

urlsToProcess = deque(['']) 

In the main loop (who runs until there is no more urls) process url looking for more urls to feed the deque urlsToProcess

url = urlsToProcess.popleft()
    urlsFile.write(url + "\n")
    parts = urlparse(url)
    base_url = "{0.scheme}://{0.netloc}".format(parts)
    path = url[:url.rfind('/')+1] if '/' in parts.path else url
    print("Crawling site: %s" % url)
        response = requests.get(url)

for anchor in soup.find_all("a"):
        # extract link
        link = anchor.attrs["href"] if "href" in anchor.attrs else ''
        if link.startswith('/'):
            link = base_url + link
        elif not link.startswith('http'):
            link = path + link
        # add url to the the list
        if not link in urlsToProcess and not link in processed_urls:

And scan and save the emails in a file.

new_emails = set(re.findall(r"[a-z0-9\.\-+_]+@[a-z0-9\.\-+_]+\.[a-z]+", response.text, re.I))
    for email in new_emails:
        if email not in emails:
            emailsFile.write(email + "\n")

To donwload the full script clone/fork it from bitbucket zxcoders

PHP - Run your python from web

executer print screen

Have you ever need to run some python script's in you server?

If you need to run , and it's helpfull to do it from a web page where is a script to help you.

Is a very simple script just in one php file. Fell free to copy, share, and modify

LINK to BitBucket


Subscribe to ZXCoders Blog RSS