This file contains 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
from django.db.models.signals import post_save | |
from project.app_name.models import MyModel | |
def do_something(sender, *args, **kwargs): | |
#do something awesome | |
post_save.connect(do_something, sender=MyModel) |
This file contains 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
[global] | |
default-timeout = 60 | |
respect-virtualenv = true | |
download-cache = ~/.pip/cache | |
log-file = ~/.pip/pip.log | |
build = ~/.pip/build | |
[install] | |
use-mirrors = true |
This file contains 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
### In view ### | |
def my_view(request, *args, **kwargs): | |
#stuff that happens | |
my_dict = { 'value1': "hi", 'value2': "world" } | |
return render_to_response(template, { | |
'my_dict': my_dict, | |
}, RequestContext(request)) |
This file contains 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
postgres: | |
pkg: | |
-name: postgresql | |
- installed | |
service: | |
- running | |
- name: postgresql | |
postgis: | |
pkg: |
This file contains 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
version-control: | |
pkg: | |
- names: | |
- git | |
- git-core | |
- subversion | |
- mercurial | |
- installed |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bootstrap, from Twitter</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Le styles --> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bootstrap, from Twitter</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Le styles --> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bootstrap, from Twitter</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!-- Le styles --> |
This file contains 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
[program:program_name1] | |
environment = PYTHONPATH="<< set up your python path here >>",DJANGO_SETTINGS_MODULE="program.settings" | |
command=<< path to project >>/manage.py celeryd -v 2 -B -s celery -E -l INFO | |
user=nobody | |
numprocs=1 | |
stdout_logfile=/var/log/celery/program_name1.log | |
stderr_logfile=/var/log/celery/program_name1.err | |
autostart=true | |
autorestart=true |
This file contains 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
A guy walks into a bar and orders a shot of whisky. He gulps it down and peeks into his shirt pocket. | |
He then orders another shot of whisky, gulps it down and peeks into his short pocket. | |
He orders a third shot and does the same thing. After the sixth shot, he asks the bartender for the bill, pays and starts to walk out. | |
Curiosity gets the better of the bartender and he says to the guy: | |
"Excuse me, but I noticed that every time you drank a shot, you kept looking into your pocket. I was wondering what's in your pocket. | |
"The guy slurs, "Well, I have a picture of my wife in my pocket. I keep drinking until she starts to look good." |
OlderNewer