Skip to content

Instantly share code, notes, and snippets.

@richbeales
richbeales / patch_openhab_bluetooth.sh
Last active February 11, 2016 21:12 — forked from CrackerStealth/patch_openhab_bluetooth.sh
BASH Script to Patch OpenHAB Bluetooth Binding For Linux
#!/bin/sh
# Patch OpenHAB Bluetooth Binding For Linux
#
# Description: Patches the bluetooth binding compiled for OpenHAB with the
# libraries needed to run on Linux. You should change the path to Java below
# in the JAVA_BIN enviornmental variable.
#
# PLACE THIS SCRIPT IN AN EMPTY DIRECTORY WITH THE OPENHAB BLUETOOTH BINDING!
#
@richbeales
richbeales / gist:273430f30cbf758ef3b4
Created October 5, 2014 19:09
Track working time from workstation lock and unlock events
__author__ = 'richbeales'
from datetime import datetime, timedelta
import unittest
DATE_FORMAT = "%d/%m/%Y %H:%M:%S"
SHORT_FORMAT = "%d/%m/%Y"
class TimeParser(object):
def setup(self):
# 1 = unlock
@richbeales
richbeales / castle-stack-trace
Created March 16, 2012 09:34
Castle DynamicProxy stack trace
(Inner Exception)
Date and Time: 13/03/2012 12:10:59
Machine Name: VM1
IP Address: 1.2.3.4
Current User: MYCO\account-test
Application Domain: MyCompany.MyProgram.exe
Assembly Codebase: file:///C:/Program Files/MyCompany/MyProgram/MyCompany.MyProgram.exe
Assembly Full Name: MyCompany.MyProgram, Version=7.2.8.0, Culture=neutral, PublicKeyToken=null
Assembly Version: 7.2.8.0