Skip to content

Instantly share code, notes, and snippets.

View athal7's full-sized avatar

Andrew Thal athal7

  • Thoughtworks
  • Chicagoland
  • 05:05 (UTC -05:00)
View GitHub Profile
@athal7
athal7 / comedHourlyPrice.sh
Last active March 12, 2024 20:34
ComEd Hourly Price
#!/bin/bash
# Used with https://github.com/dwaan/homebridge-file-switch
API_URL="https://hourlypricing.comed.com/api?type=currenthouraverage"
price=$(curl -s "$API_URL" | jq -r '.[0].price')
if [ -n "$DEBUG" ]; then echo $price; fi
if (( $(echo "$price < 5" | bc -l) )); then echo "On"; else echo "Off"; fi
@athal7
athal7 / db-application.ex
Created April 17, 2019 13:58
mnesiac / libcluters / kube dns
defmodule Db.Application do
@moduledoc false
use Application
require Logger
def start(_type, _args) do
import Supervisor.Spec, warn: false
init_cluster(System.get_env("CLUSTER_DNS"), System.get_env("CLUSTER"))