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.
import re
from com.infinitekind.moneydance.model import ParentTxn
#
# 1. SET YOUR CREDIT CARD ACCOUNT NAME HERE
AMAZON_ACCOUNT_NAME="Chase Amazon Visa"
#
#
# 2. Go to https://www.amazon.com/gp/b2b/reports export an order history report and put the full
# file path here.
/**
* 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();
# for a in /sys/kernel/iommu_groups/*; do find $a -type l; done | sort -n
/sys/kernel/iommu_groups/0/devices/0000:00:01.0
/sys/kernel/iommu_groups/10/devices/0000:00:07.1
/sys/kernel/iommu_groups/11/devices/0000:00:08.0
/sys/kernel/iommu_groups/12/devices/0000:00:08.1
/sys/kernel/iommu_groups/13/devices/0000:00:08.2
/sys/kernel/iommu_groups/14/devices/0000:00:08.3
/sys/kernel/iommu_groups/15/devices/0000:00:14.0
/sys/kernel/iommu_groups/15/devices/0000:00:14.3
/sys/kernel/iommu_groups/16/devices/0000:00:18.0
var kerf = 0.125;
var stock_length = 96;
function arraySum(arr) {
var sum = 0;
for (var i = 0, len = arr.length; i < len; sum += arr[i++]);
sum += (arr.length * kerf);
return sum;
}
// This #include statement was automatically added by the Particle IDE.
#include <ArduinoJson.h>
// This #include statement was automatically added by the Particle IDE.
#include <HttpClient.h>
// This #include statement was automatically added by the Particle IDE.
#include <PietteTech_DHT.h>
// This #include statement was automatically added by the Particle IDE.
socket.io-client:url parse https://api.ambientweather.net/?api=1&applicationKey=MY_APP_KEY +0ms
socket.io-client new io instance for https://api.ambientweather.net/?api=1&applicationKey=MY_APP_KEY +0ms
socket.io-client:manager readyState closed +0ms
socket.io-client:manager opening https://api.ambientweather.net/?api=1&applicationKey=MY_APP_KEY +0ms
engine.io-client:socket creating transport "websocket" +0ms
engine.io-client:socket setting transport websocket +29ms
socket.io-client:manager connect attempt will timeout after 20000 +32ms
socket.io-client:manager readyState opening +1ms
engine.io-client:socket socket receive: type "open", data "{"sid":"XXXXXXXX-XXXX","upgrades":[],"pingInterval":25000,"pingTimeout":60000}" +218ms
engine.io-client:socket socket open +0ms
/**
* License:
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
@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