Skip to content

Instantly share code, notes, and snippets.

View michaelmcdonald's full-sized avatar

Michael McDonald michaelmcdonald

  • Facility for Rare Isotope Beams
  • Lansing, MI
  • 02:30 (UTC -04:00)
View GitHub Profile
@michaelmcdonald
michaelmcdonald / water_leak_alert.yaml
Created April 6, 2021 01:32
HASS Water Leak Alert Blueprint
blueprint:
name: Moisture Sensor
description: Perform action when moisture sensor turns wet
domain: automation
input:
actions:
name: Actions
description: Notifications or similar to be run.
{{ trigger.event.data.new_state.attributes.friendly_name }} will be the name of the
sensor
@michaelmcdonald
michaelmcdonald / gist:77f72901f28bd5806abd054483aed926
Created June 11, 2019 11:41
Curl command to get HTTP status code
curl -sL -w "%{http_code}\\n" "http://example.com/“ -o /dev/null
<style type="text/css">
<!--
hr {
height: 1px;
border: none;
border-top: 1px solid #aaa;
}
td {
vertical-align: top;
@michaelmcdonald
michaelmcdonald / user_bottom_buttons.css
Created February 6, 2019 11:56
Anki Large and Colorful Buttons Plugin CSS Modifications
/* All buttons at the bottom of the review screen
(including the "Edit" and the "More" button) */
button {
height: 32px;
font-size: 14px;
border: solid 1px rgba(0, 0, 0, 0.2);
border-radius: 6px;
-webkit-appearance: none;
outline: none;
}
#!/bin/sh
# Call as repeatcmd.sh <command></command>
# Get text to output from args
CMD=$1
# Check that a command was supplied
if [[ $CMD == "" ]]; then
exit
#!/usr/bin/expect
# Expect script to repeatedly run the same command
# by jwbensley<at>gmail.com
# If you don't like it, fuck off.
# Long delay for those tricky hostnames
set timeout 60

Keybase proof

I hereby claim:

  • I am michaelmcdonald on github.
  • I am michaelmcdonald (https://keybase.io/michaelmcdonald) on keybase.
  • I have a public key ASC5Bx83BzjO7w8RrjSZt9v-MZE1j2gh9olZ8C2bIcvCGgo

To claim this, I am signing this object:

@michaelmcdonald
michaelmcdonald / install_gnucmd_osx.sh
Created October 17, 2018 01:13 — forked from tomdavidson/install_gnucmd_osx.sh
Installs GNU Command Line Tools & then some.
#!/usr/bin/env bash
# Installs GNU Command Line Tools & then some. Requires homebrew.
# Most are newer and more powerful that than OSX’s but also solves most OS compatibility issues
echo "Installing GNU coreutils and various."
export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
brew install coreutils
brew install binutils
brew install diffutils
brew install ed --with-default-names
brew install findutils --with-default-names