This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014-03-14T12:06:54.871918+00:00 app[worker.1]: resolve_fast_staging.py/job ERROR Failed: resolving remainging rows in fast staging | |
2014-03-14T12:06:54.871918+00:00 app[worker.1]: Traceback (most recent call last): | |
2014-03-14T12:06:54.871918+00:00 app[worker.1]: "fast_events_master")) | |
2014-03-14T12:06:54.871918+00:00 app[worker.1]: File "/app/upworthyetl/__init__.py", line 25, in error_handling | |
2014-03-14T12:06:54.871918+00:00 app[worker.1]: File "/app/upworthyetl/resolve_fast_staging.py", line 20, in job | |
2014-03-14T12:06:54.871918+00:00 app[worker.1]: InternalError: 1023 | |
2014-03-14T12:06:54.871918+00:00 app[worker.1]: yield | |
2014-03-14T12:06:54.873387+00:00 app[worker.1]: Process resolve_fast_staging.py/job: | |
2014-03-14T12:06:54.871918+00:00 app[worker.1]: | |
2014-03-14T12:06:54.873529+00:00 app[worker.1]: File "/app/.heroku/python/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am aconbere on github. | |
* I am anders (https://keybase.io/anders) on keybase. | |
* I have a public key whose fingerprint is B3CB AC64 FF6E F86D C4FA 5E58 0F5A 56CD 5DE9 07B5 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import with_statement | |
from os import path, makedirs | |
def render_template(doc, env, template_path): | |
template = env.get_template(template_path) | |
return template.render(doc=doc, **doc.headers) | |
def publish(doc, env, publish_dir): | |
out = render_template(doc, env, doc.template) | |
publish_dir = path.join(publish_dir, doc.publish_directory()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Network.HTTP | |
import Text.JSON | |
import System.Environment | |
get :: String -> IO String | |
get url = do simpleHTTP (getRequest url) >>= getResponseBody | |
main :: IO () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#+++ pubsub_presence_controller.rb | |
class Pubsub_presenceController < Babylon::Base::Controller | |
@@nodes = [] | |
def nodes | |
Babylon.logger.debug { "NODES" } | |
@from = Babylon.config["jid"] | |
@to = Babylon.config["pubsub_jid"] | |
@id = "nodereq" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Pubsub_presenceController < Babylon::Base::Controller | |
@@nodes = [] | |
@@listeners = Subscribers.new | |
@@pubsub_subscribers = Subscribers.new | |
def on_connected | |
# send a node request | |
@from = Babylon.config[:jid] | |
@to = Babylon.config[:pubsub_jid] | |
@id = "nodereq1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PubsubNode | |
include SAXMachine | |
element :item, :as => :jid, :value => :jid | |
element :item, :as => :node, :value => :node | |
element :item, :as => :name, :value => :name | |
end | |
class DiscoItems < Babylon::Base::Stanza | |
element :iq, :as => :to, :value => :to | |
element :iq, :as => :from, :value => :from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build = function(tag, attrs){ | |
var node = document.createElement(tag); | |
for(var k in attrs) { | |
node.setAttribute(k, attrs[k]) | |
} | |
return node; | |
}; | |
text = function(text) { | |
return document.createTextNode(text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildNode = function(tag, attrs){ | |
var node = document.createElement(tag); | |
for(var k in attrs) { | |
node.setAttribute(k, attrs[k]) | |
} | |
return node; | |
}; | |
text = function(text) { | |
return document.createTextNode(text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iq = xml('iq', {xmlns: "http:..."}, function() { | |
this.xml('query', {xmlns: 'http://jabber.org/protocol/disco#items', node: "root"}, function() { | |
for(var i = 0; i < 10; i++){ | |
this.xml('item', {}, function() { | |
this.text('item-' + i); | |
}); | |
} | |
}); | |
}); |
OlderNewer