Skip to content

Instantly share code, notes, and snippets.

View jgumbley's full-sized avatar

Jim Gumbley jgumbley

View GitHub Profile
http://www.hudson-labs.org/content/hudson-pycon
http://marakana.com/forums/java/general/79.html
http://www.fednet.net/asx/mg/MG121809.asx
http://www.bbc.co.uk/iplayer/episode/b00plhhs/Review_2009_The_Year_in_Politics/
http://www.eventghost.org/downloads/EventGhost_0.3.7.r1387_Setup.exe
http://www.mckinseyquarterly.com/ghost.aspx?ID=/Economic_Studies/Country_Reports/The_looming_deleveraging_challenge_2510?gp=1
import ConfigParser
import base64
import unittest
import os
import optparse
class SettingsTest(unittest.TestCase):
"""Tests for the Settings class"""
def setUp(self):
self.testfile = "test.ini"
NameVirtualHost *:80
<VirtualHost *:80>
ServerName blog.client1.net
DocumentRoot /var/www/client1/blog
</VirtualHost>
<VirtualHost *:80>
ServerName www.client1.net
DocumentRoot /var/www/client1/www
# for the deamon behavoir
WSGIDaemonProcess appname-django processes=2 threads=15
WSGIProcessGroup appname-django
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.client1.net
# to mount the application from the wsgi script (see next gist)
WSGIScriptAlias / /path/to/your/dev.wsgi
import os, sys
sys.path.append('/path/to/djangoapp/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'djangoapp.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
import djangoapp.monitor
djangoapp.monitor.start(interval=1.0)
set nocompatible
colors wombat
map <F2> :NERDTreeToggle<CR>
set guioptions-=T
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
set autoindent
set number
import urllib, md5, datetime
from cgi import parse_qs
class PayPal:
"""PayPal Utility Class
* blog url
* http://djangosnippets.org/snippets/1181/
* https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_NVPAPIOverview
"""
import logging
logging.basicConfig(level=logging.DEBUG)
@jgumbley
jgumbley / install_python.sh
Created January 12, 2011 22:04
setup python 2.7.1 on CENTOS 5.* server
# wget -O install_python.sh https://gist.github.com/raw/777001/install_python.sh
# chmod +x install_python.sh
# ./install_python.sh
#!/bin/sh
echo "******************************************"
echo "Configure Centos box with a recent version"
echo "of Python. "
echo " - jgumbley 12/jan/11"
@jgumbley
jgumbley / .vimrc_console
Created January 12, 2011 23:17
.vimrc file for console, i.e. for headless servers accessed over SSH
map <F2> :NERDTreeToggle<CR>
set nocompatible
set tabstop=4
set shiftwidth=4
set expandtab
set softtabstop=4
set autoindent
set number