Skip to content

Instantly share code, notes, and snippets.

Elizabeth Leddy eleddy

Block or report user

Report or block eleddy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eleddy
eleddy / mailling_list_troll.py
Created Aug 28, 2012
Get stats for overall health of a mailing list over time
View mailling_list_troll.py
#! /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 Aug 9, 2011
example config for site stuff
View 000-mysite.conf
<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
View ReniceSendmail.bash
#! /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
View moveField.py
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'
View Sample Demographics Xml Output
<demographics>
<id>demo.2010-01-14.6557744442</id>
<title>Demographics</title>
<subject>
</subject>
<description>
</description>
<contributors>
</contributors>
<creators>
View LDAP Modifications for better performance in PloneLDAP
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()
View gist:446032
#! /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
View gist:446031
#! /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
You can’t perform that action at this time.