Skip to content

Instantly share code, notes, and snippets.

@kenners
kenners / Patient List.tex
Created September 27, 2010 18:47
A basic xetex template for patient list.
\documentclass[10pt]{article}
\usepackage[a4paper,landscape,top=2cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}
\usepackage{fontspec}
\setmainfont{Calibri}
\usepackage{array}
\pagestyle{myheadings}
\markright{Patient List \hfill Strictly Confidential \hfill}
\begin{document}
\section*{Patient List - \today}
\begin{tabular}{ | m{1.5cm} | m{3cm} | m{3cm} | m{3cm} | m{3cm} | m{2.5cm} | m{3cm} | m{4cm} | }
@kenners
kenners / MRCS B OSCE stations - October 2012.md
Created October 13, 2012 14:17
Report of MRCS Part B OSCE stations from October 2012.

MRCS Part B OSCE stations from October 2012

Overview

Two circuits: 12 stations in each (including 2 rest stations in each circuit, and one prep station in each circuit before the comm skills stations) i.e. 18 actual assessment stations in total.

Start on one circuit, complete the circuit, and then break of around 10-15mins before moving to the second circuit.

Each station is 9 minutes: 6 minutes history/exam, 3 minutes viva (warning bell at this time). One minute to get between stations and read rubric outside each station.

@kenners
kenners / rsun.py
Last active August 22, 2021 21:39
Calculate sunrise and sunset times for Rothera Research Station
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Calculate local sunrise and sunset times for Rothera.
"""
import ephem
from datetime import date, datetime
import argparse
@kenners
kenners / flight.py
Last active May 15, 2020 20:10
Use Flightradar24.com's internal API to get flight path and output it as KML.
#!/usr/bin/env python3
import simplekml
import urllib.request
try:
import simplejson as json
except ImportError:
import json
fr24_flight_code = ""
@kenners
kenners / rrsync.sh
Last active August 29, 2015 14:04
Bandwidth-friendly, automagically resuming rsync wrapper. Use: ./rrsync.sh user@foo.com:~/bar.txt ~/
#!/bin/sh
RSYNC_EXIT_CODE=1
SKIP_COMPRESSION=7z/avi/bz2/deb/gz/iso/jpeg/jpg/mov/mp3/mp4/m4a/m4v/mkv/ogg/rpm/tbz/tgz/z/zip/xz/txz
while [ $RSYNC_EXIT_CODE -ne 0 ];
do
echo `date -u "+%Y-%m-%d %H:%M:%S"` " Resuming rsync. Last exit code=$RSYNC_EXIT_CODE";
rsync -avzchP \
--timeout=120 \
--bwlimit=10 \
--compress-level=9 \
@kenners
kenners / keybase.md
Created September 19, 2014 14:56
keybase.io proof

Keybase proof

-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.15 (Darwin)

owNCWmg2MUFZJlNZsy1gUgAB6P//////7//f//P/v7b//////vd//////7//vv/7
99/v///AAwccN2HHAMqfok080p+qbCgbUaPU8UGjyhtRp6RtTQeo9R6jygNqeoeo
aMjNQyD0mh5QepoyM0T1DyR6I8UyeoekHoR6DU2QmhspoaZPUepp6Rpp5T1Ngnqh
lMgZAAAAAAADQAABoNAAAAAaAZDQaAAAAAAAAAAAAAAAADQAip4p6Gmk9JmkmnpT
01MmhpoAGgAAaAA0aAAAANGgPUNANA0AAADQAABpoAAaAAAAAA1MkJkm00k9QekN
@kenners
kenners / p50.ipynb
Last active August 29, 2015 14:15
Calculate p50 from pO2 and sO2.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kenners
kenners / route53-dyndns.sh
Last active August 27, 2018 12:20
Updates a AWS Route53 record with the machine's current IP address.
#!/bin/bash
set -o nounset # Treat unset variables as an error when performing parameter expansion
set -o errexit # Halt script on error
set -o xtrace # Print a trace of simple commands and their arguments after expansion and before execution
HOSTED_ZONE_ID=YOUR_HOSTED_ZONE_ID
DNS_NAME=WWW.EXAMPLE.COM
IP=$(curl -s https://checkip.amazonaws.com)
CHANGE_ID=$(aws route53 change-resource-record-sets \