Skip to content

Instantly share code, notes, and snippets.

Ying Li cyli

Block or report user

Report or block cyli

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
@cyli
cyli / requestbin.py
Last active Aug 29, 2015
Local request bin that handles arbitrary paths. Run "twistd -n web --resource-path=requestbin.py" with twisted >= 15.2.1
View requestbin.py
"""
A request bin.
"""
import json
from twisted.logger import Logger
from twisted.web.resource import Resource
log = Logger('requestbin')
View model.py
@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):
"""
@cyli
cyli / keybase.md
Last active Jul 15, 2016
keybase.md
View 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 / insert_notes.py
Last active Sep 6, 2019
Gross hack to add presenter notes to the HTML export of a keynote presentation.
View insert_notes.py
"""
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 / finddscs.py
Created Apr 11, 2012
Download twisted package .dsc's from twisted's launchpad repo
View finddscs.py
#!/usr/bin/env python
"""
Downloads dsc files associated with a particular version of Twisted for a
particular Ubuntu release.
"""
import re
import subprocess
You can’t perform that action at this time.