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
import slumber | |
import json | |
import requests | |
#val = api.project.get(slug='read-the-docs') | |
#val = api.project('pip').get() | |
#val = api.build.get(pk=49252) | |
#val = api.build.get(project__slug='read-the-docs') |
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
import json | |
import redis | |
host = "localhost" | |
r = redis.Redis(host=host) | |
def send(to, message): | |
r.publish('out', | |
json.dumps({ | |
'version': 1, |
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
class Mock(object): | |
def __init__(self, *args, **kwargs): | |
pass | |
def __getattr__(self, name): | |
return Mock | |
In [4]: m = Mock() |
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
description "Gunicorn for ReadTheDocs" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
#Send KILL after 20 seconds | |
kill timeout 5 | |
respawn | |
env VENV="/home/docs/sites/readthedocs.org" |
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
description "Gunicorn for ReadTheDocs" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
#Send KILL after 20 seconds | |
kill timeout 5 | |
respawn | |
env VENV="/home/docs/sites/readthedocs.org" |
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
+ \ Navigate the maze / | |
+ \ of our code? / | |
+ \ To the servers / | |
+ ] your changes rode [ ,'| | |
+ ] [ / | | |
+ ]___ ___[ ,' | | |
+ ] ]\ /[ [ |: | | |
+ ] ] \ / [ [ |: | | |
+ ] ] ] [ [ [ |: | | |
+ ] ] ]__ __[ [ [ |: | |
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
server { | |
listen 80; | |
server_name rtfd.org *.rtfd.org; | |
if ($host ~* (.*)\.rtfd\.org) { | |
set $slug $1; | |
rewrite ^(.*)$ http://$slug.readthedocs.org; | |
} | |
rewrite ^/(\w+)$ http://$1.readthedocs.org/; | |
rewrite ^(.*)$ http://readthedocs.org/; |
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
Hosting Sphinx docs at GitHub | |
----------------------------- | |
Before: Run sphinx-quickstart in docs/ | |
1. Follow "Project Pages" instructions from http://pages.github.com/ to create a gh-pages branch | |
2. Add Sphinx html build dir as git submodule: | |
git checkout master | |
git submodule add -b gh-pages [email protected]:arthurk/django-disqus.git docs/_build/html |
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
""" | |
This fabric file makes setting up and deploying a django application much | |
easier, but it does make a few assumptions. Namely that you're using Git, | |
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have | |
Django installed on your local machine and SSH installed on both the local | |
machine and any servers you want to deploy to. | |
_note that I've used the name project_name throughout this example. Replace | |
this with whatever your project is called._ |
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 http://groups.google.com/group/django-developers/msg/7236b842d53fb58a | |
Let me tell you a store about three people named Everybody, Anybody, | |
Somebody and Nobody. | |
There was a job to be done. Everybody agreed it should be done. | |
Anybody could have done it. Somebody should have done it. Nobody | |
actually did it. :-) |