Skip to content

Instantly share code, notes, and snippets.

View ofross's full-sized avatar

Oliver Fross ofross

View GitHub Profile
@ofross
ofross / pge_to_pvoutput.sh
Created April 2, 2018 04:35
Script to take electric consumption data from PG&E and post it to PVOutput.org so as to compare net energy use
#!/bin/sh -x
# Get hourly consumption data from PG&E, modify it to be daily, and them upload
# consumption data to PVOutput.org. One main/sad limitation is data is aggregated
# daily, not hourly. wah wah.
#
# Super thanks, and totally depends on: https://github.com/qwertangel/getPGEUsageData
#
# Post as per https://pvoutput.org/help.html#api ; Read the "Service API" section
#

Keybase proof

I hereby claim:

  • I am ofross on github.
  • I am oof (https://keybase.io/oof) on keybase.
  • I have a public key ASBtjM3P5Dg2lR9IQUiaB-6HJlJehqpsqOmS1Bf1k9Lh0Qo

To claim this, I am signing this object:

@ofross
ofross / edgemax-snmp.sh
Last active September 2, 2017 23:06 — forked from nbrownus/edgemax-snmp.sh
Pull snmp stats from edgemax, submit to graphite/carbon
#!/bin/sh
# expects the following env vars
# METRIC_PREFIX - At least the hostname to record these stats under in graphite - collectd.someserver
# SNMP_HOST - the host to pull snmp stats from
# CARBON_HOST - The carbon host to send the stats
# CARBON_PORT - The carbon port to send the stats
NOW="$(date +%s)"
@ofross
ofross / haproxy-deb.sh
Created May 27, 2016 21:39 — forked from nbrownus/haproxy-deb.sh
Builds a super basic haproxy deb, no extra crap
#!/bin/sh
VERSION="1.5.8"
BUILD="betable1"
set -e -x
DIRNAME="$(cd "$(dirname "$0")" && pwd)"
OLDESTPWD="$PWD"