This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Set various token markers based on bar cur/max ratios | |
* | |
* The CONFIG array can have any number of configuration objects. These objects | |
* are processed in order. | |
* | |
* barId - The ID of the bar to look at the values for [1, 2, 3] | |
* barRatio - The ratio of bar value to max value that triggers setting the status marker [0 - 1] | |
* status - The name of the status marker to toggle [redmarker, bluemarker, greenmarker, brownmarker, purplemarker, dead] | |
* whenLow - The state of the marker when the bar value is <= the ratio [true, false] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Automatically removes temp HP if they exist. | |
* | |
* When a token has its HP reduced the script checks to see if there are any | |
* temp HP available. If it does those are removed first and the real HP is | |
* updated to reflect the temp HP absorbing the hit. | |
* | |
* TEMP_BAR_ID - The bar used to track temp HP [1, 2, 3] | |
* HP_BAR_ID - The bar used top track real HP [1, 2, 3] | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When dealing with XML variables (Document, Node, Element) in the debug view of Eclipse | |
it can be handy to see the actual XML instead of the object model. Eclipse's Detail | |
Formatter feature makes this possible. | |
* Right click on the xml object in question | |
* Select "New Detail Formatter" | |
* Paste the code below into the Detail Formatter Code Snippet | |
* Enjoy! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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. |
NewerOlder