Skip to content

Instantly share code, notes, and snippets.

View deathbybandaid's full-sized avatar

Deathbybandaid deathbybandaid

  • Deathbybandaid
  • Michigan
View GitHub Profile
@deathbybandaid
deathbybandaid / wake-up-light-alarm-with-sunrise-effect.yaml
Created October 21, 2022 17:20 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
#!/bin/bash
# Configurables
# exclude list rules:
# * () runs task for all containers
# * (2050) excludes container 2050
# * (2050 2051) excludes container 2050 and 2051
# * (all) excludes all containers
timezone_exclude_list=()
lxc_cleanup_exclude_list=(2050)
@deathbybandaid
deathbybandaid / gist:cf1faedb87098224943dc04453bc3f79
Created September 13, 2017 21:33 — forked from darkyen/gist:120c46739985ebf3b39b
Ferengi Rules of Acquisition [Complete List*]
1 "Once you have their money, you never give it back." "The Nagus" (DS9 episode)
2 "The best deal is the one that makes the most profit." The 34th Rule (DS9 novel)
3 "Never spend more for an acquisition than you have to." "The Maquis, Part II" (DS9 episode)
4 "A woman wearing clothes is like a man in the kitchen." The Ferengi Rules of Acquisition (DS9 novel)
5 "Always exaggerate your estimates." Cold Fusion (SCE novel)
6 "Never let family stand in the way of opportunity." "The Nagus" (DS9 episode)
7 "Always keep your ears open." "In the Hands of the Prophets" (DS9 episode)
8 "Small print leads to large risk." The Ferengi Rules of Acquisition (DS9 novel)
9 "Instinct, plus opportunity, equals profit." "The Storyteller" (DS9 episode)
10 "Greed is eternal." "Prophet Motive" (VOY episode)
#!/bin/sh
## eth0 raspbian static
## Current IP
OLDETH_IP=`ip addr show eth0 | grep "inet\b" | awk '{print $2}' | cut -d/ -f1`
## Current Gateway
OLDETH_GATEWAY=`ip route show 0.0.0.0/0 dev eth0 | cut -d\ -f3`
## NEW IP
NEWETH_IP=$(whiptail --inputbox "Please enter desired IP for eth0" 10 80 "$OLDETH_IP" 3>&1 1>&2 2>&3)
## Cleanup
sudo sed -i '/#eth0/d' /etc/dhcpcd.conf