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$"
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

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:

racemetric {
# -I0 = Turn off idle GC, -A4M = 4megs of initial heap, -qg1 = Parallel GC in gen 1
exec = "racemetric -p 8080 -e prod +RTS -I0 -A4M -qg1"
stdout = "log/stdout.log"
stderr = "log/stderr.log"
}
start on startup
setuid racemetric
exec angel angel.conf
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
ssl_certificate ssl-bundle.crt;
ssl_certificate_key ssl-private.key;
ssl_session_timeout 5m;