19
Sep 10

What is new in iPad 4.2 iOS?

Here is my compilation of screenshots showing what is new in iOS 4.2 for iPad:

Some of the most remarkable features in iOS 4.2 beta:

  • Ability to choose font in Notes app
  • New languages (Catalan among them!)
  • Changed the default behaviour of rotate button: now it works as a Mute button (like in the iPhone)
  • Ability to create folders (groups) of programs in the desktop
  • Game Center
  • Multitasking!

14
Sep 10

FCB makes football look handball

Some minutes ago, FCB fans had another chance to contemplate another amazing display of football, in an amazing first half against Panathinaikos.

Barcelona started the match with a total dominion over the Greeks. All the players in front of Busquets, have been playing one-touch showing their abilities moving the ball from wing to wing around the penalty area constantly switching their positions.

Continue reading →


14
Sep 10

Run Django apps using Gunicorn and nginx

Some days ago, I read this tweet by @jessenoller (via @DZPM):

The future is DUNG: Django, Unix, Nginx, Gunicorn. I plan on asking HR to look for DUNG on all resumes.

What the heck is Gunicorn, I wondered… In short, Gunicorn is a Python WSGI HTTP Server easy to set up that gets on well with Django. Running Django apps using my beloved nginx gets faster and easier using Ubuntu Lucid Lynx. Look below…

  • Install packages (I assume you’ve already set up nginx)
# apt-add-repository ppa:bchesneau/gunicorn
# aptitude update
# aptitude install gunicorn supervisor python-setuptools
  • Edit settings.py in your Django app and add gunicorn to your INSTALLED_APPS
INSTALLED_APPS = (
  'django.contrib.auth',
  ...
  'gunicorn',
  ...
)
  • Setup the supervisor of Django process in /etc/supervisor/conf.d/djangoapp.conf
[program:djangoapp]
command=/usr/bin/python /path/to/your/app/manage.py run_gunicorn
directory=/path/to/your/app
user=www-data
autostart=true
autorestart=true
redirect_stderr=True
  • Restart supervisor
  • Setup nginx
upstream app_server_djangoapp {
    server localhost:8000 fail_timeout=0;
}

server {
	listen X.X.X.X:80;
	server_name  .example.com;

	access_log  /var/log/nginx/example.com.access.log;
	error_log  /var/log/nginx/example.com.error.log info;

    keepalive_timeout 5;

    # path for static files
    root /path/to/your/app/media;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;

        if (!-f $request_filename) {
            proxy_pass http://app_server_djangoapp;
            break;
        }
    }
}
  • Have fun

It was crystal clear LAMP’s time was over, could DUNG be the next fashionable acronym in free software web apps world?