Skip to content

Instantly share code, notes, and snippets.

@jesrui
jesrui / ForwardRasPiHwRng.md
Last active November 17, 2020 06:50
How to forward the Raspberry Pi hardware random number generator over ssh

How to forward the Raspberry Pi hardware random number generator over ssh

This is a modification of RandPi. The diffrence is that here the data transport is done via ssh forwarding instead of a custom http service.

See the C't article Mit dem Raspberry Pi Zufallszahlen erzeugen und verteilen for more information (in german).

@jesrui
jesrui / hn-thread2mbox.py
Created February 13, 2017 13:22
download a hacker news thread from firebaseio.com and convert it to mbox format
#!/bin/env python
# sample usage:
# $ hn-thread2mbox.py 13606863 > 13606863.mbox
# downloads from hacker-news.firebaseio.com the thread with id=13606863
# and dumps it to stdout in mbox format.
import urllib.request
import json
import time
import sys
@jesrui
jesrui / main.rs
Created April 21, 2016 20:33 — forked from jorendorff/main.rs
randspeed/src/main.rs
#![feature(test)]
/*
* main.rs - Clueless random number generation benchmark
*/
extern crate rand;
extern crate test;
use rand::{random, thread_rng, XorShiftRng, Isaac64Rng, StdRng, Rng};