Skip to content

Instantly share code, notes, and snippets.

View hnnesv's full-sized avatar

Hannes Venter hnnesv

View GitHub Profile

Keybase proof

I hereby claim:

  • I am hnnesv on github.
  • I am hnnesv (https://keybase.io/hnnesv) on keybase.
  • I have a public key whose fingerprint is 4316 E263 5C95 F6F4 747B 3BA0 BCFB 1E20 C438 A479

To claim this, I am signing this object:

@hnnesv
hnnesv / evaporate
Created June 23, 2015 13:46
evaporate
#!/bin/bash
# Remove any files or folders that have a 'transient' tag and haven't been accessed in a while
echo "[`date`] Evaporate task triggered";
for i in `mdfind -onlyin ~ 'tag:transient'`; do
if test "`find $i -atime +5`"; then
rm -fR $i;
echo "[`date`] Removed $i";
@hnnesv
hnnesv / suranga-doc3-pretty.xml
Created May 7, 2015 09:06
XDS Mediator Issue 13 - no bug
<?xml version="1.0"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:hl7-org:v3" classCode="DOCCLIN" moodCode="EVN">
<realmCode code="UV"/>
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2"/>
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.11.2"/>
<id root="01EACC8C-CE2E-42FA-B538-DFE58D72BF58"/>
<code code="57055-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Antepartum Summary Note"/>
<title language="en-US">Antepartum Summary</title>
<effectiveTime value="20140628110600.093-0400"/>
@hnnesv
hnnesv / suranga-doc3.xml
Last active August 29, 2015 14:20
XDS Mediator Issue 13 - Bug
<?xml version="1.0" encoding="utf-8"?><ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" classCode="DOCCLIN" moodCode="EVN" xmlns="urn:hl7-org:v3"><realmCode code="UV" /><typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040" /><templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.2" /><templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.11.2" /><id root="01EACC8C-CE2E-42FA-B538-DFE58D72BF58" /><code code="57055-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Antepartum Summary Note" /><title language="en-US">Antepartum Summary</title><effectiveTime value="20140628110600.093-0400" /><confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25" displayName="normal" /><languageCode code="en-US" /><recordTarget typeCode="RCT" contextControlCode="OP"><patientRole classCode="PAT"><id root="2.16.840.1.113883.3.72.5.9.0" extension="9ef9b8ec-764f-4f5c-b280-f9a6952817b7" /><id root="2.16.840.1.113883.3.72.5.9.1" extension="5364286559887121999" /><addr use="H"><streetAddressLi
@hnnesv
hnnesv / openhim_webui_user.py
Created April 25, 2014 08:37
Create a sql insert statement for adding a openhim webui user
import hashlib
import random
import string
import sys
def generateSalt():
s=string.lowercase+string.digits
return ''.join(random.sample(s,10))
if __name__ == "__main__":
@hnnesv
hnnesv / setclock.sh
Created February 19, 2013 09:42
Tool for HIMMS Showcase 2013 - Set the system clock via watch.
#!/bin/bash
# Usage: run this script using the watch command; e.g.
# sudo watch ./setclock.sh
if [ -f "/tmp/clockset" ]; then
echo "Setting date";
date `cat /tmp/clockset`;
rm -f /tmp/clockset;
fi
@hnnesv
hnnesv / demo.php
Last active December 13, 2015 22:29
Tool for HIMMS Showcase 2013 - Execute a service command via a web endpoint.
<?php
if (!isset($_GET["type"])) {
echo "1";
} else {
$type = $_GET["type"];
$cmd = "false";
if ($type == "clockset") {
#date format MMDDhhmm[[CC]YY][.ss]
@hnnesv
hnnesv / hide.css
Created December 18, 2012 10:54
YouTube Comments Hider (Chrome Extension)
#watch7-discussion { display: none; }