Skip to content

Instantly share code, notes, and snippets.

@cyli
cyli / insert_notes.py
Last active November 7, 2021 13:10
Gross hack to add presenter notes to the HTML export of a keynote presentation.
"""
Export your keynote file to HTML. Pass the keynote file (to extract the
presentation notes) and the extracted HTML directory to this script, and it
will attempt to inject the presenter notes it extracted from the Keynote file
into the HTML.
Only tested on Keynote '09, Chrome 24.0.1312.56
"""
import os
@cyli
cyli / keybase.md
Last active July 15, 2016 20:40
keybase.md

Keybase proof

I hereby claim:

  • I am cyli on github.
  • I am cyli (https://keybase.io/cyli) on keybase.
  • I have a public key ASBCeT_ibEOa-xZZUwUa47EC4EpTSI5BynV95MqHw2p8Ago

To claim this, I am signing this object:

@cyli
cyli / finddscs.py
Created April 11, 2012 21:11
Download twisted package .dsc's from twisted's launchpad repo
#!/usr/bin/env python
"""
Downloads dsc files associated with a particular version of Twisted for a
particular Ubuntu release.
"""
import re
import subprocess
@cyli
cyli / requestbin.py
Last active August 29, 2015 14:24
Local request bin that handles arbitrary paths. Run "twistd -n web --resource-path=requestbin.py" with twisted >= 15.2.1
"""
A request bin.
"""
import json
from twisted.logger import Logger
from twisted.web.resource import Resource
log = Logger('requestbin')
@cyli
cyli / model.py
Last active August 29, 2015 14:12
@implementer(ILBDescription)
@attributes([Attribute("lb_id", instance_of=str)])
class RCv3Description(object):
"""
Information representing a Rackspace RCv3 node mapping.
:ivar str lb_id: The Load Balancer ID.
"""
def equivalent_definition(self, other_description):
"""