Skip to content

Instantly share code, notes, and snippets.

View mitchellrj's full-sized avatar

Richard Mitchell mitchellrj

View GitHub Profile
@reedobrien
reedobrien / recaptcha.py
Created November 16, 2010 04:57
Deform Recaptcha Widget
## widget
import httplib2
from urllib import urlencode
import colander
from colander import null
from colander import Invalid
from deform.widget import CheckedInputWidget
@tomster
tomster / .gitconfig
Created September 25, 2011 11:48
An example git configuration including convenience aliases, some saner default behavior, a neat shell prompt and tab completion that can display the name of the tracking remote
# ~/.gitconfig
[branch]
autosetupmerge = true
[push]
default = current
[core]
excludesfile = .gitignore
@offmessage
offmessage / emergency-www.yoursite.com
Created December 21, 2011 18:00
An apache config for a maintenance page
<VirtualHost *:80>
ServerName www.yoursite.com
ServerAdmin hosting@yourdomain.com
DocumentRoot /var/local/sites/www.yoursite.com/emergency
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{ENV:REDIRECT_STATUS} !=503
RewriteRule ^ - [L,R=503]
# Make sure index.html doesn't exist
@davisagli
davisagli / gist:2317969
Created April 6, 2012 07:42
Marmoset patching
import inspect
def marmoset_patch(func, s, r):
source = inspect.getsource(func).replace(s, r)
exec source in func.func_globals
func.func_code = func.func_globals[func.__name__].func_code
def foo():
print 1
print 2
@jparrill
jparrill / yum_update_report.sh
Last active June 6, 2018 17:56
Yum update checker with severities RHEL/CentOS/Fedora
#!/bin/bash
#####
## Author: jparrill@redhat.com
## Dept: Consulting/Infrastructure
## Detail: Script to check updates and their severity
## Example: yum_update_report.sh -s Moderate
#####
function validations ()
{
@shacker
shacker / gist:87908e13c9ee6655ce90
Last active July 17, 2024 14:55
Using the Workday API with Python and the suds client library
import sys
from suds import client
from suds.wsse import Security, UsernameToken
from suds.sax.text import Raw
from suds.sudsobject import asdict
from suds import WebFault
'''
Given a Workday Employee_ID, returns the last name of that employee.