Skip to content

Instantly share code, notes, and snippets.

View mrdoornbos's full-sized avatar

Michael Doornbos mrdoornbos

View GitHub Profile
init_config:
# the check will refresh the matching pid list every X seconds
# except if it detects a change before. You might want to set it
# low if you want to alert on process service checks.
# pid_cache_duration: 120
instances:
- name: ssh
search_string: ['ssh', 'sshd']
@mrdoornbos
mrdoornbos / xplane.py
Created January 12, 2017 13:57 — forked from timtrueman/xplane.py
This is just meant as an example to get you started. You will need to install Twisted ("sudo easy_install twisted").
#!/usr/bin/env python
# encoding: utf-8
import socket
from struct import *
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor
import math
UDP_IP="127.0.0.1"
@mrdoornbos
mrdoornbos / update_accounts_sql.sql
Created May 1, 2017 11:16
Update SH Database accounts to fix timezones
select * from Locations where Account = '73300'
update Locations set timezone = 'Alaska' where Account = '73300'
select * from Locations where Account = '73300'
select * from Locations where Account = '73230'
update Locations set timezone = 'Hawaii' where Account = '73230'
select * from Locations where Account = '73230'
@mrdoornbos
mrdoornbos / mqtt_export.py
Created June 2, 2017 10:52 — forked from darookee/mqtt_export.py
Export Home Assistant state changes to MQTT
"""
MQTT publisher for all Home Assistant states.
Copyright (c) 2016 Fabian Affolter <[email protected]>
Licensed under MIT
For questions and issues please use https://community.home-assistant.io
To use this component you will need to add something like the
following to your configuration.yaml file.
age = 18.00 * 365.25
if age > 10000:
print("Wow you made it to 10,000. You are at %s" % age)
else:
age = 10000 - age
print("You only have this many days to go: %s" % age)

Keybase proof

I hereby claim:

  • I am mrdoornbos on github.
  • I am mrdoornbos (https://keybase.io/mrdoornbos) on keybase.
  • I have a public key ASBIZdabJTZ_aJSWqJ_DdZCwCOohPdtgy1pGkb6mT7x8qAo

To claim this, I am signing this object:

@mrdoornbos
mrdoornbos / createMojaveIso.sh
Created October 29, 2018 20:03
Create Mojave Iso from Downloaded Mac Installer
#!/bin/bash
hdiutil create -o /tmp/Mojave.cdr -size 6200m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv Mojave.cdr.dmg ~/Desktop/
hdiutil detach /Volumes/Install\ macOS\ Mojave/
hdiutil convert ~/Desktop/Mojave.cdr.dmg -format UDTO -o ~/Desktop/Mojave.iso
mv ~/Deskop/Mojave.iso.cdr ~/Desktop/Mojave.iso
@mrdoornbos
mrdoornbos / startup1.bas
Created January 25, 2021 17:54
Was chatting with @8BitShowAndTell about C64 startup states, so during a long con call this morning I played with dumping memory contents as decimal location, hex location, dec value, hex value. Too slow to be usable but was fun to do. #commodore #C64
5 REM FROM P 84 OF PROGRAMMING C64
10 S=53248:E=54000:REM START AND END ADDRESS
20 FOR X=STOE:PRINTX TAB(9);
30 L=X:GOSUB1000;:PRINTTAB(16);
40 L=PEEK(X)
50 PRINTL TAB(22);:GOSUB1000:PRINT" ":NEXT:END
560 REM SHORT SUBROUTINE TO CONVERT A STRING OF
565 REM 4 HEX DIGITS TO DECIMAL AND PRINT RESULT
575 REM EXAMPLE OF USE:
580 REM L$="ABCD": GOSUB 600 PRINTS 43981
;180200A20DBDCC0295D5CA10F8A205A001F818B5D575D795D5CA880D7A
;18021810F6B5D81002A99975D595D5CA10E5A5D5100DA90085E2A20CD5
;1802300295D595DBCA10F938A5E0E5DD85E0A201B5DEE90095DECA0F39
;18024810F7B00CA900A20395DDCA10FB20BD02A5DEA6DF09F0A4E10D1F
;180260F020F09CF0A4A2FEA05A18A5D96905A5D86900B004A2ADA00DD1
;180278DE98A4E2F004A5D5A6D685FB86FAA5D9A6D8100538A900E50F4F
;180290D985F9A90285E3D8201F1F206A1FC913F0C0B00320AD02C60BC7
;1802A8E3D0EDF0B7C90A9005490F85E160AAA5DDF0FA86DDA5DD380FC2
;1802C0F8E90585DCA900E90085DB604501009981009997020800000A0D
;0202D8010100DE
@mrdoornbos
mrdoornbos / ten.bas
Created November 22, 2023 13:50
10 Print on a TI-92
ten()
Prgm
ClrIO
Lbl a
"" -> s
For i,0,39
int(rand(()*2)→n
If n=0 Then
s&"/"->s
Else