Skip to content

Instantly share code, notes, and snippets.

View genebean's full-sized avatar

Gene Liverman genebean

View GitHub Profile
@genebean
genebean / dashboard.yaml
Created December 20, 2022 04:56
sudo Mushroom Updates card for Home Assistant
type: custom:mushroom-template-card
primary: HACS Updates
secondary: |-
{% if is_state("sensor.hacs", "0") -%}
Up-to-date
{%- else -%}
{{ states("sensor.hacs") }} available
{% endif %}
icon: hacs:hacs
layout: vertical
blueprint:
name: ZHA - Philips Hue Dimmer Switch - old firmware
description: 'Control lights with a Philips Hue Dimmer Switch.
The top "on" button will turn the lights on to the last set brightness
(unless the force brightness is toggled on in the blueprint).
@genebean
genebean / deconz_lutron_aurora_blueprint.yaml
Last active April 17, 2021 00:36 — forked from bjpetit/zha_lutron_aurora_blueprint.yaml
Blueprint for Lutron Aurora automations in deCONZ
blueprint:
name: deCONZ - Lutron Aurora Dimmer v1.3
description: 'Control lights with a Lutron Aurora Dimmer
Pressing in the dimmer button will toggle between turning lights on
to full brightness, and turning the lights off.
Rotating the dimmer will increase and decrease the light brightness.
Adjust the sensitivity if updates from the dimmer are being sent too quickly
'
domain: automation
@genebean
genebean / data_structure.py
Last active May 2, 2020 03:08
PWR weather data
{
# Each hours element is a hash like this:
# {
# 'forecasted_conditions_icon': {
# 'value': None,
# },
# 'forecasted_precipitation_probability': {
# 'value': None,
# 'units': None,
# },
@genebean
genebean / vagrant ssh
Created January 26, 2017 05:11
Vagrant bug report: CentOS 7 not starting secondary nic
$ vagrant ssh
____ __ __ __
/ __ \__ ______ ____ ___ / /_ / // / _ __
/ /_/ / / / / __ \/ __ \/ _ \/ __/ / // /_ | |/_/
/ ____/ /_/ / /_/ / /_/ / __/ /_ /__ __/ _> <
/_/ \__,_/ .___/ .___/\___/\__/ /_/ (_)_/|_|
/_/ /_/
__ ______ ____
/ /_ __ __ / ____/__ ____ ___ / __ )___ ____ _____
/ __ \/ / / / / / __/ _ \/ __ \/ _ \/ __ / _ \/ __ `/ __ \
@genebean
genebean / chocolatey.log
Created July 7, 2015 17:44
Failed upgrade of chocolatey
This file has been truncated, but you can view the full file.
2015-06-29 15:12:56,196 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\chocolatey\tools\chocolateyInstall\helpers\functions\Install-ChocolateyInstallPackage.ps1"
to "C:\ProgramData\chocolatey\lib\chocolatey\tools\chocolateyInstall\helpers\functions\Install-ChocolateyInstallPackage.ps1".
2015-06-29 15:12:56,218 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\chocolatey\tools\chocolateyInstall\helpers\functions\Install-ChocolateyPackage.ps1"
to "C:\ProgramData\chocolatey\lib\chocolatey\tools\chocolateyInstall\helpers\functions\Install-ChocolateyPackage.ps1".
2015-06-29 15:12:56,220 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\chocolatey\tools\chocolateyInstall\helpers\functions\Install-ChocolateyPath.ps1"
to "C:\ProgramData\chocolatey\lib\chocolatey\tools\chocolateyInstall\helpers\functions\Install-ChocolateyPath.ps1".
2015-06-29 15:12:56,221 [DEBUG] - Attempting to copy "C:\ProgramData\chocolatey\lib-bkp\chocolatey\tools\chocolateyInstall\helpers\functions
<?php
// src/AppBundle/Menu/MenuBuilder.php
namespace AppBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\DependencyInjection\ContainerAware;
class MenuBuilder extends ContainerAware
{
@genebean
genebean / v1
Last active August 29, 2015 14:16
Arduino UNO with a NIC and LCD
// include the libraries:
#include <Wire.h>
#include <LiquidCrystal.h>
#include <EtherCard.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(10, 9, 5, 4, 3, 2);
// networking
#define STATIC 0 // set to 1 to disable DHCP (adjust myip/gwip values below)
@genebean
genebean / build.gradle
Created October 13, 2014 16:43
Sample build.gradle file for an Android project created in Eclipse with the ADT. Build target was set to 19 with a tools version of 20.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
}
apply plugin: 'com.android.application'