Skip to content

Instantly share code, notes, and snippets.

View sandbender's full-sized avatar

Rudy X. Desjardins sandbender

View GitHub Profile
@sandbender
sandbender / gist:76e8ad7767ada69cea96
Last active August 29, 2015 14:05
Python context manager to swallow the given exception types (or all exceptions by default)
class swallow(object):
"""
This is a context manager (use via 'with' syntax) that will
'swallow' any Exceptions of the given type within the block
being managed.
If nothing is passed to the context manager constructor, then
*any* `Exception` generated within the block will be swallowed.
The cosntructor arg is the same format as the 2nd arg of the
@sandbender
sandbender / kragle_pocket_type.json
Last active August 29, 2015 14:05
Pocket Item Type
{
"item_id": "\u0001//item_id",
"resolved_id": "\u0001//resolved_id",
"given_url": "\u0001//given_url",
"given_title": "\u0001//given_title",
"resolved_url": "\u0001//resolved_url",
"resolved_title": "\u0001//resolved_title",
"favorite": "\u0001//favorite",
"status": "\u0001//status",
"excerpt": "\u0001//excerpt",

Keybase proof

I hereby claim:

  • I am sandbender on github.
  • I am sandbender (https://keybase.io/sandbender) on keybase.
  • I have a public key whose fingerprint is 4B43 2BA2 D292 2FEB B614 6E61 30AA D33B 96FF A628

To claim this, I am signing this object: