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 imaplib | |
import logging | |
import mailbox | |
import netrc | |
import getpass | |
from datetime import datetime, timezone | |
logging.basicConfig(level=logging.DEBUG) |
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 requests | |
from datetime import datetime | |
import appdaemon.plugins.hass.hassapi as hass | |
app_token = "<FIREFLY_PERSONAL_ACCESS_TOKEN>" | |
firefly_url = "<FIREFLY_URL>" | |
main_account_name = "Main account" | |
salary_amount = 4000 | |
salary_date = 28 |
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
// Preconditions: | |
// Shelly connected to a manual switch and to a smart light | |
// Shelly set to disconnected mode and to restore power to on after power loss | |
// Input mode is button (might need a minor change for switch - untested) | |
// Shelly is added to Home Assistant | |
// An automation is created in Home Assistant to toggle the light when single button press is | |
// detected on the Shelly (other automations may also exist) | |
let online_status = 0; | |
// Change this to the URL of your Home Assistant base URL + "/api/ping" |
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
#!/bin/bash | |
start="2012-01-20" end="2012-03-02" now=$start; while [ "$now" != "$end" ]; do now=`date +"%Y-%m-%d" -d "$now + 1 day"`; echo $now ;done | |
sh -c 'start="2012-01-20" end="2012-03-02" now=$start; while [ "$now" != "$end" ]; do now=`date +"%Y-%m-%d" -d "$now + 1 day"`; echo $now ;done' | xargs -n 1 -P 5 -i echo {} |