Skip to content

Instantly share code, notes, and snippets.

View NorthIsUp's full-sized avatar
🥯

Adam Hitchcock NorthIsUp

🥯
View GitHub Profile
[color]
# this sets * = auto for all color sections
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
{
"auto_complete": true,
"auto_complete_commit_on_tab": false,
"auto_complete_delay": 0,
"auto_complete_selector": "source - comment",
"auto_complete_size_limit": 4194304,
"auto_complete_triggers":
[
{
"characters": "<",
@NorthIsUp
NorthIsUp / spawn.py
Created July 5, 2012 12:46
gevent spawn helpers
"""
realertime.lib.spawn
~~~~~~~~~~~~~~~~~~~~
:author: Adam Hitchcock
:copyright: (c) 2012 DISQUS.
:license: Apache License 2.0, see LICENSE for more details.
"""
from __future__ import absolute_import
@NorthIsUp
NorthIsUp / fap.py
Created July 16, 2012 15:56
fapwws test
#!/usr/bin/env python
from gevent import monkey
monkey.patch_all()
from gevent.queue import Queue
from gevent import sleep
from gevent import spawn
import fapws._evwsgi as evwsgi
from fapws import base
@NorthIsUp
NorthIsUp / tmp.C46PsDfPAz.py
Created July 19, 2012 18:49
sys.setrecursionlimit
import sys
def recur(i=0):
print i
sys.setrecursionlimit(i + 2)
recur(i + 1)
recur(1)
@NorthIsUp
NorthIsUp / tmp.uNfPcmmUXB.py
Created August 1, 2012 21:47
greenlet generators
from gevent import spawn
from gevent import sleep
def gen():
def _gen():
i = 0
while True:
yield i
i += 1
@NorthIsUp
NorthIsUp / thoonk_extensions.py
Created August 28, 2012 01:55
extensions for thoonk jobs
from thoonk.feeds import Job
from thoonk.feeds.queue import Empty
import time
# To use this do the super horrible following actions:
# job = pubsub.job(channel)
# job.__class__ = JobExtended
class JobExtended(Job):
@NorthIsUp
NorthIsUp / helpers.py
Created August 29, 2012 17:09
flask helpers
"""
disqus.flask.helpers
~~~~~~~~~~~
:author: Adam Hitchcock
:copyright: (c) 2011 DISQUS, Inc.
:license: Apache License 2.0, see LICENSE for more details.
"""
from flask import current_app
@NorthIsUp
NorthIsUp / fuel.py
Last active October 12, 2015 01:18
Reverse engineering of the nike fuel api to get your fuel
"""
Author: [email protected]
to run you will need to install the following:
pip install requests
pip install simplejson
get the auth token and device id by sniffing the nike app syncing
with api.nike.com with charles
@NorthIsUp
NorthIsUp / RealtimeConf2012.md
Created October 29, 2012 17:58 — forked from rauchg/RealtimeConf2012.md
Realtime Conf 2012 Talks