Skip to content

Instantly share code, notes, and snippets.

View dmpeters's full-sized avatar
👨‍🔧

David Peters dmpeters

👨‍🔧
View GitHub Profile
@cyrusboadway
cyrusboadway / google-domains-dynamic-dns-update.sh
Created February 20, 2016 17:21
Script to update a Google Domains DNS record
#!/bin/bash
### Google Domains provides an API to update a DNS "Syntheitc record". This script
### updates a record with the script-runner's public IP, as resolved using a DNS
### lookup.
###
### Google Dynamic DNS: https://support.google.com/domains/answer/6147083
### Synthetic Records: https://support.google.com/domains/answer/6069273
USERNAME=""
@idan
idan / gist:8296699
Last active January 2, 2016 11:29
PyCon and Passover

I love PyCon. And until 2016, I can’t go, because the organizers failed to open a calendar before scheduling the conference in conflict with Passover—for two years running.

This is the story of how a large population was casually excluded from an event that [assigns so much value to being inclusive][CoC]. I say “casually” because it has been almost an entire year since the organizers were made aware of their failure, and they haven’t communicated publicly about it once—not to own up to the problem, and not to take steps to prevent it from happening again. Given the swift actions following incidents ([1][pyconincident1], [2][pyconincident2], [donglegate][donglegate]) at PyCon, it’s hard to feel that this failure is being treated with any kind of gravity when it escapes mention for so long, so it’s time to speak up.

Before I dive into the details, I’d like to stress that I have no personal animus with the organizers, and any suggestions of malice or (sigh) “antisemitism” on their part are simply unfou

@dmpeters
dmpeters / gist:3195360
Created July 29, 2012 00:04
homebrew issues with git and pkg-config after installing mountain lion osx 10.8
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
Undefined symbols for architecture x86_64:
"_iconv", referenced from:
_reencode_string in libgit.a(utf8.o)
_reencode_string in libgit.a(utf8.o)
"_iconv_close", referenced from:
"_iconv_close", referenced from:
_reencode_string in libgit.a(utf8.o)
Undefined symbols for architecture x86_64:
@dmitric
dmitric / backend.py
Created March 24, 2012 18:06
SqlAlchemy usage with tornado backend
class Backend(object):
def __init__(self):
engine = create_engine("mysql://{0}:{1}@{2}/{3}".format(options.mysql_user, options.mysql_pass, options.mysql_host, options.mysql_db)
, pool_size = options.mysql_poolsize
, pool_recycle = 3600
, echo=options.debug
, echo_pool=options.debug)
self._session = sessionmaker(bind=engine)
@classmethod
@ayang
ayang / app.py
Created February 4, 2012 03:47
Tornado session manager use redis
class Application(tornado.web.Application):
def __init__(self):
tornado.web.Application.__init__(self, handlers, **settings)
self.db_session = db_session
self.redis = redis.StrictRedis()
self.session_store = RedisSessionStore(self.redis)
class BaseHandler(tornado.web.RequestHandler):