Skip to content

Instantly share code, notes, and snippets.

View eleddy's full-sized avatar

Elizabeth Leddy eleddy

View GitHub Profile
@eleddy
eleddy / mailling_list_troll.py
Created August 28, 2012 20:52
Get stats for overall health of a mailing list over time
#! /bin/python
import urllib2
import csv
import datetime
import math
class GmaneListStats(object):
def __init__(self, what_is_recent=30, group='gmane.comp.web.zope.plone.devel'):
@eleddy
eleddy / 000-mysite.conf
Created August 9, 2011 01:52
example config for site stuff
<IfModule mod_disk_cache.c>
# cache cleaning is done by htcacheclean, which can be configured in
# /etc/default/apache2
#
# For further information, see the comments in that file,
# /usr/share/doc/apache2.2-common/README.Debian, and the htcacheclean(8)
# man page.
# This path must be the same as the one in /etc/default/apache2
# note: to make things even faster, set noatime on these files
#! /bin/bash
## was having issues with sendmail blowing out the cpu
## renice all processes run by the smmsp user
## default priority is 0
renice +5 -u smmsp
def moveField(name, direction=None, pos=None, after=None, before=None):
"""Move a field
name:
name of the field
direction:
Move a field inside its schemata to the left (-1) or to the right (+1)
pos:
Moves a field to a position in the whole schema. pos is either a number
or 'top' or 'bottom'
<demographics>
<id>demo.2010-01-14.6557744442</id>
<title>Demographics</title>
<subject>
</subject>
<description>
</description>
<contributors>
</contributors>
<creators>
security.declareProtected(manage_users, 'getGroupedUsers')
def getGroupedUsers(self, groups=None):
""" Return all those users that are in a group """
all_dns = {}
users = []
member_attrs = list(Set(GROUP_MEMBER_MAP.values()))
if groups is None:
groups = self.getGroups()
#! /usr/bin/python
import os
import atexit
import signal
import sys
from xxx.services.utilities import write_pid, exit_function, handle_sigterm
from twisted.web import xmlrpc, server, resource
from twisted.internet import defer
#! /usr/bin/python
import os
import atexit
import signal
import sys
from xxx.services.utilities import write_pid, exit_function, handle_sigterm
from twisted.web import xmlrpc, server, resource
from twisted.internet import defer