Skip to content

Instantly share code, notes, and snippets.

View mrnohr's full-sized avatar

Matthew Nohr mrnohr

View GitHub Profile
@mrnohr
mrnohr / 00-header
Last active July 16, 2019 02:06
Raspberry Pi Message of the Day mod
#!/bin/sh
#
# 00-header - create the header of the MOTD
# Copyright (c) 2013 Nick Charlton
# Copyright (c) 2009-2010 Canonical Ltd.
#
# Authors: Nick Charlton <hello@nickcharlton.net>
# Dustin Kirkland <kirkland@canonical.com>
#
# This program is free software; you can redistribute it and/or modify
@mrnohr
mrnohr / demo2.groovy
Created November 11, 2014 18:31
SDC Demo 2
/**
* Turn It On When There Is Motion
*
* Author: SmartThings
*/
definition(
name: "D2 - Turn It On Advanced",
namespace: "mrnohr",
author: "SmartThings",
description: "Turn something on when motion is detected.",
#!/bin/bash
# --- Version history ---
# mrn: sleep for $freq instead of 3 seconds (forked)
# 0.4: added variable to store file path, and $2 for base file name
# added variable to store desired reporting interval
# 0.3: added $1 to send in process ID at run time.
# 0.2: switched to $SECONDS for the loop. works.
# 0.1: didn't work well at all.
# --- Version history ---

Keybase proof

I hereby claim:

  • I am mrnohr on github.
  • I am mrnohr (https://keybase.io/mrnohr) on keybase.
  • I have a public key whose fingerprint is 8FC6 4D9F 4349 9A60 36F3 E6CF E222 198A 75DB 7354

To claim this, I am signing this object:

@mrnohr
mrnohr / TeamStatsController.groovy
Created October 4, 2012 16:28
Grails and Google Charts
def chart() {
//create the data table (list of lists) - first row is the headers
def totalYardsStats = [["'Week'", "'Chicago'", "'Detroit'", "'Green Bay'", "'Minnesota'"]]
//actual data CHI DET GB MIN
totalYardsStats << ["'Week 1'", 428, 429, 324, 389]
totalYardsStats << ["'Week 2'", 168, 296, 321, 327]
totalYardsStats << ["'Week 3'", 274, 437, 268, 344]
totalYardsStats << ["'Week 4'", 430, 341, 421, 227]