Skip to content

Instantly share code, notes, and snippets.

View ericholscher's full-sized avatar
🌲
Vacation until April 22

Eric Holscher ericholscher

🌲
Vacation until April 22
View GitHub Profile
@ericholscher
ericholscher / rtdapi.py
Created April 13, 2012 01:55
API Wrapper for RTD
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')
@ericholscher
ericholscher / gist:2268845
Created March 31, 2012 21:45
Basic Redis IRC Client
import json
import redis
host = "localhost"
r = redis.Redis(host=host)
def send(to, message):
r.publish('out',
json.dumps({
'version': 1,
class Mock(object):
def __init__(self, *args, **kwargs):
pass
def __getattr__(self, name):
return Mock
In [4]: m = Mock()
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"
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"
+ \ Navigate the maze /
+ \ of our code? /
+ \ To the servers /
+ ] your changes rode [ ,'|
+ ] [ / |
+ ]___ ___[ ,' |
+ ] ]\ /[ [ |: |
+ ] ] \ / [ [ |: |
+ ] ] ] [ [ [ |: |
+ ] ] ]__ __[ [ [ |: |
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/;
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 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._
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. :-)