Skip to content

Instantly share code, notes, and snippets.

@edalquist
edalquist / wake-up-light-alarm-with-sunrise-effect.yaml
Last active September 27, 2021 03:38 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect pct
blueprint:
name: Wake-up light alarm with sunrise effect pct
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.
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@edalquist
edalquist / zfs_health.sh
Created January 14, 2020 06:11 — forked from emiljaregran/zfs_health.sh
ZFS Health Check Script
#!/usr/local/bin/bash
#
# MODIFIED VERSION OF:
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
emailReceiver="receiver@yourdomain.com"
@edalquist
edalquist / zfs_health.sh
Created January 14, 2020 06:08 — forked from petervanderdoes/zfs_health.sh
ZFS Health Check Script
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@edalquist
edalquist / TwinkleFOX.ino
Last active December 19, 2018 20:45 — forked from kriegsman/TwinkleFOX.ino
TwinkleFOX: Colored Twinkling Holiday Lights
/**
* Modified version of https://gist.github.com/edalquist/debd5c83f02e1a08e891678b33f07d00
* that compiles on particle.io hardware.
*/
#include <FastLED.h>
FASTLED_USING_NAMESPACE;
#define PARTICLE_NO_ARDUINO_COMPATIBILITY 1
#include "Particle.h"
#define FL_PROGMEM
@edalquist
edalquist / full-ffmpeg.sh
Last active July 27, 2016 21:06
Install on ReadyNAS OS6
# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
Sunk1 = False
Sunk2 = False
if guess_row == ship_row1 and guess_col == ship_col1:
Sunk1 = True
board[guess_row][guess_col] = "S"
print "Congratulations! You sunk my battleship!"
elif guess_row == ship_row2 and
guess_col == ship_col2:
Sunk2 = True
board[guess_row][guess_col] = "S"