Skip to content

Instantly share code, notes, and snippets.

View jaywink's full-sized avatar
💭
Federating

Jason Robinson jaywink

💭
Federating
View GitHub Profile
@jaywink
jaywink / reflect.py
Created January 17, 2019 07:48 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@jaywink
jaywink / factories.py
Last active August 29, 2015 14:06 — forked from mbrochh/factories.py
import datetime
import md5
from django.contrib.auth.models import User
import factory
class UserFactory(factory.Factory):
"""
#!/usr/bin/env ruby
# List of spam accounts
spam_accounts = %w(spamacc@podA spamacc@podB spamacc@mypod)
# Delete comments even if spammer isn't a local user or spam isn't on a
# local users account
always_delete = true
# Keep empty (%w() or []) to retract for all local users