Skip to content

Instantly share code, notes, and snippets.

View ed-davies's full-sized avatar

Ed Davies ed-davies

View GitHub Profile
#!/bin/bash
set -e
STAMP=$(date "+%Y-%m-%dT%H:%M:%S")
DEST=/media/ed/hitachi
MACHINE=$(uname -n)
TARGET=$DEST/$MACHINE
[ -d $TARGET ] || (
#!/usr/bin/env python2.6
# -*- coding: utf-8 -*-
import sys
import serial
import threading
import Queue
import datetime
import xml.dom
import xml.dom.minidom
@ed-davies
ed-davies / version
Created May 9, 2014 11:33
wget without SNI
edavies@bill:~$ wget --version
GNU Wget 1.13.4 built on linux-gnu.
+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
Wgetrc:
/etc/wgetrc (system)
Locale: /usr/share/locale
Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
-DLOCALEDIR="/usr/share/locale" -I. -I../../src -I../lib
@ed-davies
ed-davies / thermal-mass.py
Last active January 3, 2016 17:49
Quick-and-dirty simulation of the effect of thermal mass on a cartoon house's heating requirements.
#!/usr/bin/env python3
import math
# Constants to reference times of day in seconds conveniently.
MINUTES = 60
HOURS = 60 * MINUTES
DAYS = 24 * HOURS
# House dimensions (in metres) and similar parameters.