Skip to content

Instantly share code, notes, and snippets.

View hodgestar's full-sized avatar
🐢

Simon Cross hodgestar

🐢
View GitHub Profile
diff --git a/package.json b/package.json
index e0bed19..baa24b3 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
},
"dependencies": {
"go-jsbox-location": "^0.1.1",
- "go-jsbox-ona": "^0.0.1",
+ "go-jsbox-ona": "^0.0.2",
diff --git a/package.json b/package.json
index ef20352..e0bed19 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,8 @@
},
"dependencies": {
"go-jsbox-location": "^0.1.1",
+ "go-jsbox-ona": "^0.0.1",
+ "go-jsbox-metrics-helper": "^0.1.0",
diff --git a/package.json b/package.json
index ef20352..da3fb9c 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,8 @@
},
"dependencies": {
"go-jsbox-location": "^0.1.1",
+ "go-jsbox-ona": "^0.0.1",
+ "go-jsbpox-metrics-helper": "^0.1.0",
diff --git a/go_api/cyclone/handlers.py b/go_api/cyclone/handlers.py
index 063d487..43dfd7c 100644
--- a/go_api/cyclone/handlers.py
+++ b/go_api/cyclone/handlers.py
@@ -309,6 +309,47 @@ class ElementHandler(BaseHandler):
return d
+class GenericModelHandler(BaseHandler):
+ """
@hodgestar
hodgestar / campaign-api.js
Last active August 29, 2015 14:06
Campaign API design discussion
var api = {};
api.routing = {
routing_table: {
version: 'fsm-0.1',
campaign_id: 'campaign1',
components: {
'channel1': {
type: 'channel',
uuid: 'channel1',
@hodgestar
hodgestar / api-nginx.conf
Created September 5, 2014 09:48
A simple supervisord and Nginx config for running a real API.
server {
listen 9000;
server_name localhost;
location /api/ {
auth_request /auth/;
auth_request_set $owner_id $upstream_http_x_owner_id;
auth_request_set $scopes $upstream_http_x_scopes;
proxy_pass http://localhost:8888/;
proxy_set_header X-Owner-ID $owner_id;
diff --git a/go_api/cyclone/handlers.py b/go_api/cyclone/handlers.py
index 4a7872c..3259c15 100644
--- a/go_api/cyclone/handlers.py
+++ b/go_api/cyclone/handlers.py
@@ -174,11 +174,25 @@ class CollectionHandler(BaseHandler):
"""
Return all elements from a collection.
"""
- d = maybeDeferred(self.collection.all)
- d.addCallback(self.write_objects)
@hodgestar
hodgestar / jedi-emacs.rc
Created July 26, 2014 15:45
Jedi configuration for emacs
;; Requires some of the following: :)
;;
;; auto-complete.el
;; ctable.el
;; epc.el
;; fuzzy.el
;; jedi.el
;; pcache.el
;; tabulated-list.el
;; web-mode.el
@hodgestar
hodgestar / error-logging.md
Created July 10, 2014 15:48
Odd error logging.

In the default_errback for the routing dispatcher in Vumi we do:

    def default_errback(self, f, msg, connector_name):
        log.error("Error routing message for %s" % (connector_name,))
        log.error(f)

but Twisted docs (http://twistedmatrix.com/documents/10.1.0/web/howto/web-in-60/logging-errors.html) say we should be doing something more like:

    def default_errback(self, f, msg, connector_name):
 log.error(f, "Error routing message for %s" % (connector_name,))
diff --git a/setup.py b/setup.py
index c36f5cb..eb076d0 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@ setup(
'django-debug-toolbar==0.9.4',
'kombu==2.5.6',
'librabbitmq==1.0.1',
- 'hiredis==0.1.1',
+ 'hiredis==0.1.4',