Protect your Server with Fail2Ban
Fail2ban is a program that scan your log files for any malicious behavior, and automatically block the offending IP.
كيف تنشئ موقع انترنت مجانا
هل تملك عنوان بريد الكتروني تحت gmail او hotmail؟ ماذا لو بحثت عن اسمك هل ستظهر صفحتك في تويتر او فيس بوك؟
لماذا لا تقوم بحجز اسم نطاق خاص بك مثل www.rr.sa ويكون عنوانك البريدي هو rayed@rr.sa، وبالمجان ايضاً.
Accelerating Postgres connections with PgBouncer
PgBouncer is a lightweight connection pooler for PostgreSQL, connection pooling makes Postgres connection much faster, which is important in Web applications.
Translation in Django
Preparing Django project to support multiple langauges is easier than you think!
Graph you Data and Email It
I have a new website and I want to know the number of new signup every day, so I wrote a small script new_users.sh
that will print the number of new signups today.
Free Electronics Video Courses
PyroElectro have decent and recent courses on electronics that cover different fields.
Ubuntu new server checklist
These are the step I perform after installing new Ubuntu machine.
Django returning JSON for AJAX requests
In your views.py
you can have a page that return JSON data for AJAX request like this:
Setting Up Python and Supervisor on CentOS
CentOS default repository is very limited, and even if you install EPEL you will get old packages, in my case I needed to install Supervisor to manage my Django application, after trying to do it manually and through EPEL I ended up with the following setup.
Django Multiple Settings with Single File
Instead of having multiple settings files one for production and one for development and so on, I prefer to use an “if” statement with environment variable: