Skip to content

Instantly share code, notes, and snippets.

View georgeh's full-sized avatar

George Hotelling georgeh

View GitHub Profile
@georgeh
georgeh / aqi_fans.yml
Created June 29, 2023 15:09
Home Assistant automation to run fans based on AQI
alias: Run Fans Based on Indoor AQI
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.indoor_aqi
below: 50
id: aqi_1
- platform: numeric_state
entity_id: sensor.indoor_aqi
above: 50
@georgeh
georgeh / mastodon-dark.user.css
Last active November 19, 2022 13:54
Makes the text box on Mastodon dark
/* ==UserStyle==
@name Mastodon dark text box
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author Me
==/UserStyle== */
@-moz-document domain("mastodon.social") {
.theme-default .autosuggest-textarea__textarea {
background-color: #323542 !important;
@georgeh
georgeh / configuration.yaml
Last active May 22, 2022 02:07
DTE Insight Home Assistant configuration
sensor:
# Read in DTE Insight via MQTT. You can add an MQTT integration in Home Assistant with the DTE Insight's IP address on port 2883
- platform: mqtt # this is my DTE Insight, if you have multiple MQTT servers this might be different
name: Instant Energy Usage
state_topic: "event/metering/instantaneous_demand"
unit_of_measurement: W
value_template: "{{ value_json.demand }}"
state_class: measurement
device_class: energy
@georgeh
georgeh / server.js
Last active June 9, 2021 15:38
CSV logging server
/**
* Usage: node server.js foo.csv
*
* Test with: curl -d "{\"Foo\":1,\"Bar\":\"baz\"}" -X POST http://localhost:8000/
*
*/
const http = require('http');
const fs = require('fs');
const fsPromises = require('fs/promises');
/**
* External dependencies
*/
import { times, property, omit } from 'lodash';
import classnames from 'classnames';
import memoize from 'memize';
/**
* WordPress dependencies
*/
Name Sale Price Original Price Discount
5 Second Rule $13.50 $24.99 45.98%
7 Wonders $28.00 $49.99 43.99%
7 Wonders: Duel $18.49 $29.99 38.35%
A Column of Fire: The Game $26.17 $49.95 47.61%
Adventure Time Card Wars Doubles Tournament Card Game $18.70 $35.00 46.57%
Arcadia Quest Board Game $52.99 $99.99 47.00%
Arcadia Quest Frost Dragon Board Game $19.99 $29.99 33.34%
Arcadia Quest: Chaos Dragon Board Game $21.66 $29.99 27.78%
Arcadia Quest: Fire DRAGON Board Game $22.10 $29.99 26.31%
{
"presets": [
"es2015"
],
"plugins": [
"transform-runtime",
"transform-es3-property-literals",
"transform-es3-member-expression-literals"
]
}
#!/usr/local/Python-2.4/bin/python
import feedparser, html2text, os, sys
from textwrap import fill
feed = feedparser.parse("http://george.hotelling.net/index.xml")
filepath = "~/public_html/gopher"
i = 0
for entry in feed['entries']:

Keybase proof

I hereby claim:

  • I am georgeh on github.
  • I am georgeh (https://keybase.io/georgeh) on keybase.
  • I have a public key whose fingerprint is ED13 EEA2 0284 5625 147D 0D6A 8175 515C 8175 D485

To claim this, I am signing this object:

@georgeh
georgeh / gist:8317224
Created January 8, 2014 14:08
Angular dependency injection
angular.module('module')
.factory('myService', function($scope, $http, otherService) {
// ...
});
// is the same as
angular.module('module')
.factory('myService', ['$scope', '$http', 'otherService', function(scopy, ಠ_ಠ, $scope) {
// scopy == Angular's $scope
// ಠ_ಠ == Angular's $http