Skip to content

Instantly share code, notes, and snippets.

View lukehoersten's full-sized avatar

Luke Hoersten lukehoersten

View GitHub Profile
@lukehoersten
lukehoersten / config.json
Last active February 16, 2020 18:51
Raspberry Pi Homebridge Wyze Cam Config
{
"bridge": {
"name": "Homebridge",
"username": "12:34:56:78:90:AB",
"port": 51900,
"pin": "031-45-154"
},
"description": "Homebridge",
"platforms": [
{
@lukehoersten
lukehoersten / Door_accessory.js
Last active October 6, 2019 15:13
Raspberry Pi Homekit Door Accessory
var Accessory = require('../').Accessory;
var Service = require('../').Service;
var Characteristic = require('../').Characteristic;
var uuid = require('../').uuid;
var PythonShell = require('python-shell');
var door = exports.accessory = new Accessory('Door', uuid.generate('hap-nodejs:accessories:door'));
door.username = 'C1:5D:3A:EA:54:AB';
door.pincode = '031-45-154';
@lukehoersten
lukehoersten / doord.py
Created January 19, 2018 18:15
Raspberry Pi Homekit Door Accessory - Python Server
#!/usr/bin/env python3
import time
import automationhat
import sys
import queue
import threading
@lukehoersten
lukehoersten / BCryptHash.hs
Created March 8, 2016 17:38
BCrypt hash example in Haskell
import Crypto.BCrypt (hashPasswordUsingPolicy)
import Data.ByteString.Char8 (ByteString, pack)
hash :: String -> IO (Maybe ByteString)
hash = hashPasswordUsingPolicy hp . pack
where hp = HashingPolicy 12 $ pack "$2y$"
ssl_certificate cert.pem;
ssl_certificate_key cert.key.pem;
ssl_trusted_certificate cert.ca.pem;
ssl_dhparam cert.dh.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers FIPS@STRENGTH:!aNULL:!eNULL;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
-- Uncaught exception: 'getPromise: dereferenced empty key (id 0)'
manyWithSplices :: Monad n
=> Splice n
-- ^ Splice to be run
-> Splices (RuntimeSplice n a -> Splice n)
-- ^ Splices to be bound to each runtime data first
-> RuntimeSplice n [a]
-- ^ Runtime data needed by the above splices
{-# LANGUAGE OverloadedStrings #-}
module Racemetric.Form.Datetime where
import Control.Applicative ((<$>), (<*>))
import Control.Monad (liftM2, liftM3)
import Data.Text (Text)
import Data.Time.Calendar (Day (..))
import Data.Time.Format (formatTime, parseTime)
import Data.Time.LocalTime (LocalTime (..), TimeOfDay (..),

Keybase proof

I hereby claim:

  • I am lukehoersten on github.
  • I am lukehoersten (https://keybase.io/lukehoersten) on keybase.
  • I have a public key whose fingerprint is 0D06 8FE1 ADB0 DB1C ED5E C68F E729 278A A9B2 B3BC

To claim this, I am signing this object:

test-suite test
type: exitcode-stdio-1.0
main-is: Test.hs
hs-source-dirs: test/src/
default-language: Haskell2010
ghc-options: -threaded "-with-rtsopts=-N" -fhpc
build-depends: HUnit >= 1.2 && < 1.3
, base >= 4.7 && < 4.9
, your-lib >= 0.1 && < 0.2
Verifying that +lukehoersten is my openname (Bitcoin username). 1NzRr6vUysYfsLfRr8tm5Vvj4Ro1n2UVHyhttps://onename.io/lukehoersten