Instantly share code, notes, and snippets.

View scene_controller.py
"""
Component to offer scene recording and tracking. Compatible with existing
services as much as possible (e.g. scene_controller.select_option works
the same as input_select.select_option). The scene controller will track
the current scene, and light values, and optionally update the scene
record to match the current values.
"""
import logging
import voluptuous as vol
View superhub-stats.py
#!/usr/bin/env python
# Script to read DOCSIS stats from a VM SuperHub 2ac in Modem mode,
# and insert them into an InfluxDB database (e.g. for graphing)
#
# Intended to be run every minute by cron job.
# Based on https://github.com/edent/SuperHub/blob/master/SuperHubStats.py
# Adapted for InfluxDB and Modem mode
from bs4 import BeautifulSoup
View keybase.md

Keybase proof

I hereby claim:

  • I am caelor on github.
  • I am andy_boff (https://keybase.io/andy_boff) on keybase.
  • I have a public key whose fingerprint is 2569 B955 B44C C5DD 0F21 3119 7511 328A 7E48 0F9F

To claim this, I am signing this object:

View Install Notes
1) Create the files /root/switchable_config.sh and /etc/init.d/modeswitch
2) /etc/init.d/modeswitch enable to enable the config
View satip-vtuner ubuntu
Starting from Ubuntu 14.10 Server clean install
Set up:
> sudo mkdir /opt/satip
> sudo chown <user> /opt/satip
> sudo apt-get install git build-essential linux-source linux-headers-$(uname -r)
> cd /opt/satip
> git clone https://code.google.com/p/satip/
> tar xjvf /usr/src/linux-source-3.16.0/linux-source-3.16.0.tar.bz2
(extracts into /opt/satip/linux-source-3.16.0/)
View ask.sh
# This is a general-purpose function to ask Yes/No questions in Bash, either
# with or without a default answer. It keeps repeating the question until it
# gets a valid answer.
ask() {
# http://djm.me/ask
while true; do
if [ "${2:-}" = "Y" ]; then
prompt="Y/n"