Skip to content

Instantly share code, notes, and snippets.

@aptonic
aptonic / light.py
Last active October 12, 2021 03:32
Modifies homeassistant/components/flux_led/light.py to fix issue where LED lightstrip using MagicHome controller lights turn off immediately after turning them on. See https://community.home-assistant.io/t/flux-led-magiclight-dont-work-since-few-updated/145179/4
"""Support for Flux lights."""
import logging
import random
import socket
from flux_led import BulbScanner, WifiLedBulb
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
@aptonic
aptonic / Update Bundle
Last active November 1, 2017 02:50
A script you can use in a TextMate 2 bundle to make it easier to update Dropzone 3 actions
#!/usr/bin/env bash
# This script requires ansi2html.sh to be copied to ~/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared/bin/
# You can download ansi2html.sh from http://www.pixelbeat.org/scripts/ansi2html.sh
# Change this to wherever you cloned the dropzone3-actions repo to
DROPZONE_3_ACTIONS_REPO_PATH=~/"Documents/Dropzone 3/dropzone3-actions"
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
@aptonic
aptonic / bundle-gems.sh
Last active November 14, 2017 13:22
Bundles gems for use inside a Dropzone action
#!/bin/bash
# You must have Bundler installed to use this script. You can install it with:
# gem install bundler
#
# This script designed for bundling gems along with a Dropzone action.
# First create a Gemfile inside the action bundle with the following like:
#
# source 'https://rubygems.org'
# gem 'great-gem'