Skip to content

Instantly share code, notes, and snippets.

Avatar

Jake jhgg

View GitHub Profile
View magic.py
from gevent.monkey import patch_all
patch_all()
import itertools
from gevent.event import AsyncResult
from gevent import spawn
from redis import StrictRedis
from werkzeug.local import LocalProxy
View flask_sentry.py
"""
raven_utils.flask_sentry
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
View flask_sentry.py
"""
raven_utils.flask_sentry
~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
View cats.json
[
{
"src": "http://24.media.tumblr.com/tumblr_m1lew907mE1qejbiro1_1280.jpg",
"width": 600,
"height": 476
},
{
"src": "http://25.media.tumblr.com/Jjkybd3nSces6pgsQAXKUKjb_500.jpg",
"width": 500,
"height": 375
View og.html
<!-- To get image embeds showing up -->
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
<!-- If available, provide image width & height -->
<meta property="og:image:width" content="640" />
<meta property="og:image:height" content="480" />
View TypeRegistry.jsx
const registeredTypes = {};
export default function register(type) {
invariant(!registeredTypes.hasOwnProperty(type.name), `Cannot register duplicate type of name ${type.name}`);
registeredTypes[type.name] = type;
}
export default function type(typeName) {
invariant(registeredTypes.hasOwnProperty(type.name), `Unknown Type ${type.name}`);
return registeredTypes[typeName];
View gist:10419882

Keybase proof

I hereby claim:

  • I am jhgg on github.
  • I am jhgg (https://keybase.io/jhgg) on keybase.
  • I have a public key whose fingerprint is 3E89 8988 DB3A 4A28 17C7 DA97 E8CF 5EA0 05DD 3BC2

To claim this, I am signing this object: