This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run this from the command line | |
mysql_secure_installation | |
# and for you 007s who didn't listen to my advice about the password here is how to reset it. | |
dpkg-reconfigure mysql-server-5.1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this command will install mysql-server | |
sudo apt-get install mysql-server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# location for available and enabled sites with Apache as well as modules like mod_wsgi | |
/etc/apache2/ | |
# whenever something goes wrong here is where Apache makes note of it; | |
# think of it as persistent debug tool. | |
/var/log/apache2/error.log | |
# reload apache2, do this after new deploys or code changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this will install apache2 util and the documentation | |
sudo apt-get install apache2 apache2-doc apache2-utils | |
# next you will install mod-wsgi which the apache plugin that allows you to | |
# run python application as well as setup-tools | |
sudo apt-get install python-setuptools libapache2-mod-wsgi | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Last login: Mon Sep 12 13:57:29 2011 | |
myusuf3@flute:~$ sudo passwd | |
[sudo] password for myusuf3: | |
Enter new UNIX password: | |
Retype new UNIX password: | |
passwd: password updated successfully | |
myusuf3@flute:~$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# long way of doing it. | |
v = (v == 0 ? 1 : 0); | |
# shorter less cool way of doing it needs to be initialized right. | |
v = 1 - v; | |
# god like way |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./manage.py collectstatic -n | |
You have requested to collect static files at the destination | |
location as specified in your settings file. | |
This will overwrite existing files. | |
Are you sure you want to do this? | |
Type 'yes' to continue, or 'no' to cancel: yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ignore files for django project | |
*.db | |
*.pyc | |
*.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
salary_errors = { | |
'required': 'This field is required', | |
'invalid': 'Enter a whole number (Ex: 45000)' | |
} | |
salary = forms.IntegerField(label=_('Your annual net salary'), error_messages=salary_errors, required=False) |