Skip to content

Instantly share code, notes, and snippets.

@grahamking
grahamking / hello_world.rs
Created April 26, 2013 15:37
Rust: Hello world
fn main() {
println("Hello World!");
}
@grahamking
grahamking / gist:5463592
Last active December 16, 2015 16:29
rust question
struct Point {
x: int,
y: int
}
fn one() {
let mut a = ~Point{x: 10, y: 20};
a.x = 42;
println(a.x.to_str());
}
@grahamking
grahamking / redis_queue.py
Created January 26, 2012 22:54
Celery alternative?
"""Task queue using redis.
Redis client:
LPUSH work "say Hello world!"
LPUSH work "log This goes into syslog"
"""
import redis
from multiprocessing import Pool