Skip to content

Instantly share code, notes, and snippets.

"""
This is a simple example of WebSocket + Tornado + Redis Pub/Sub usage.
Do not forget to replace YOURSERVER by the correct value.
Keep in mind that you need the *very latest* version of your web browser.
You also need to add Jacob Kristhammar's websocket implementation to Tornado:
Grab it here:
http://gist.github.com/526746
Or clone my fork of Tornado with websocket included:
http://github.com/pelletier/tornado
Oh and the Pub/Sub protocol is only available in Redis 2.0.0:
import xmlrpclib
s = xmlrpclib.Server("http://localhost:8000/xmlrpc")
print(s.blogger.getUsersBlogs('0', 'joe', 'doe'))
# [{ 'blogid' : '1', 'blogName' : 'My Blog' }]
@kadefor
kadefor / comments-count-sample.html
Created August 2, 2012 03:16 — forked from valueof/comments-count-sample.html
Comments count code example
<html>
<head>
<title>Comments count code example</title>
<!--
Note: Disqus uses custom data- attributes to specify thread identifiers.
Those attributes are part of the HTML5 specs and already supported by all browsers.
For more information, see:
* http://ejohn.org/blog/html-5-data-attributes/