Skip to content

Instantly share code, notes, and snippets.

View vals's full-sized avatar

Valentine Svensson vals

View GitHub Profile
@klmr
klmr / Makefile
Last active March 21, 2024 19:55
Self-documenting makefiles
# Example makefile with some dummy rules
.PHONY: all
## Make ALL the things; this includes: building the target, testing it, and
## deploying to server.
all: test deploy
.PHONY: build
# No documentation; target will be omitted from help display
build:
@pascal-schetelat
pascal-schetelat / slope.py
Created November 30, 2013 23:42
Slope plot, Tufte style
# -*- coding: utf-8 -*-
"""
Created on Sat Nov 30 22:32:04 2013
@author: pascal Schetelat
"""
import matplotlib.pyplot as plt
"""
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: