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 / firefox-developer-edition.desktop
Last active April 1, 2019 11:08
Firefox Developer Edition (or any edition), separate Unity launcher icon (Ubuntu 14.04)
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Firefox Developer Edition
Icon=/home/user/Apps/firefox/browser/icons/mozicon128.png
Path=/home/user/Apps/firefox
Exec=/home/user/Apps/firefox/firefox --class="firefox-developer" -P dev-edition-default %u
StartupNotify=true
StartupWMClass=firefox-developer
@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
@jaywink
jaywink / gist:4168148
Created November 29, 2012 10:45
Test SMTP sending with Python ... found the template on some blog
#! /usr/local/bin/python
SMTPserver = 'smtp.domain.com'
sender = 'email@smtp.domain.com'
destination = ['recipient@domain.com']
USERNAME = "username4smtpserver"
PASSWORD = "password4smtpserver"