This file contains hidden or 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 | |
set -o pipefail | |
rid=$(uuidgen) | |
# Create a check on https://healthchecks.io/ and replace HEALTH-CHECK-KEY below | |
health_check_url="https://hc-ping.com/HEALTH-CHECK-KEY/server_backup_root_drive" | |
curl -fsS --retry 5 --retry-all-errors --retry-max-time 60 -o /dev/null $health_check_url/start?rid=$rid | |
date_string=$(date +"%Y-%m-%dT%H_%M_%S") | |
echo "$date_string $rid" |
This file contains hidden or 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
alias: LED Color Loop | |
variables: | |
transistion_time: 60 | |
sequence: | |
- service: light.turn_on | |
target: | |
entity_id: light.rec_room_led_strip_2 | |
data: | |
color_name: violet | |
brightness_pct: 50 |
This file contains hidden or 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
alias: Turn Light Up | |
mode: single | |
description: >- | |
A script that turns on lights to a given brightness level only if they are | |
currently lower than that level (or off). | |
fields: | |
light_entity: | |
description: The entity id of the light you want to turn on | |
example: light.living_room_lights | |
brightness_pct: |
This file contains hidden or 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/sh | |
# unifi-ap6-professional | |
# u6-lite-us | |
# Run with: | |
# ~/bin/check_stock.sh unifi-ap6-professional >> ~/logs/check_stock.log 2>&1 | |
email="example@gmail.com" | |
url=https://store.ui.com/products/$1 |
This file contains hidden or 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
select | |
(SUBSTRING(binary_num, 1, 4)::bit(4)::int::varchar || | |
SUBSTRING(binary_num, 5, 4)::bit(4)::int::varchar || | |
SUBSTRING(binary_num, 9, 4)::bit(4)::int::varchar || | |
SUBSTRING(binary_num, 13, 4)::bit(4)::int::varchar || | |
SUBSTRING(binary_num, 17, 4)::bit(4)::int::varchar)::int * 10 as new_state | |
, state_id, * from ( | |
select right((state::int / 10)::bit(32)::varchar, 20) as binary_num, * | |
from states | |
where entity_id = 'sensor.water_meter' |
This file contains hidden or 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/sh | |
# Add to /etc/fstab: | |
# 192.168.1.123:/mnt/media /mnt/nfs/server/media nfs defaults,rw,user 0 0 | |
# Cron: | |
# 03 * * * * /home/pi/bin/backup_full_pi.sh | |
date | |
backup_dir="/mnt/nfs/server/media/Backup/Pi/$(hostname)/" |
This file contains hidden or 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/sh | |
# Configure aws with: aws configure --profile backup | |
### Config ### | |
FILENAME="Full_Backup_`date --iso-8601=seconds`.7z" | |
BACKUP_TO_FILE_PATH="$HOME/Backups/$FILENAME" | |
BACKUP_ARCHIVE_FILE_PATH="$HOME/Backups/archive/$FILENAME" | |
BACKUP_FROM_PATH="$HOME/Documents/" | |
S3_PATH="backups/`date +%Y`/FullLocal/" |
This file contains hidden or 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/sh | |
# Configure aws with: aws configure --profile backup | |
### Config ### | |
FILENAME="Daily_Backup_`date --iso-8601=seconds`.7z" | |
BACKUP_TO_FILE_PATH="$HOME/Backups/$FILENAME" | |
BACKUP_ARCHIVE_FILE_PATH="$HOME/Backups/archive/$FILENAME" | |
BACKUP_FROM_PATH="$HOME/Documents/" | |
S3_PATH="backups/`date +%Y`/Daily/" |
This file contains hidden or 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
{ | |
"id":18584239, | |
"body":"$RSOL $ASTI Happy New Year, all!", | |
"created_at":"2014-01-01T00:00:07Z", | |
"user":{ | |
"id":239266, | |
"username":"jshank25", | |
"name":"Jason Shank", | |
"avatar_url":"http://avatars.stocktwits.com/production/239266/thumb-1371174418.png", | |
"avatar_url_ssl":"https://s3.amazonaws.com/st-avatars/production/239266/thumb-1371174418.png", |
This file contains hidden or 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
{"id":18584239,"body":"$RSOL $ASTI Happy New Year, all!","created_at":"2014-01-01T00:00:07Z","user":{"id":239266,"username":"jshank25","name":"Jason Shank","avatar_url":"http://avatars.stocktwits.com/production/239266/thumb-1371174418.png","avatar_url_ssl":"https://s3.amazonaws.com/st-avatars/production/239266/thumb-1371174418.png","official":false,"identity":"User","classification":[],"join_date":"2013-06-12","followers":0,"following":3,"ideas":56,"following_stocks":1,"location":"CA","bio":null,"website_url":null,"trading_strategy":{"assets_frequently_traded":[],"approach":"Fundamental","holding_period":"Long Term Investor","experience":"Novice"}},"source":{"id":1,"title":"StockTwits","url":"http://stocktwits.com"},"symbols":[{"id":952,"symbol":"ASTI","title":"Ascent Solar Technologies, Inc.","exchange":"NASDAQ","sector":"Technology","industry":"Semiconductor - Specialized","trending":false},{"id":3420,"symbol":"RGSE","title":"Real Goods Solar, Inc.","exchange":"NASDAQ","sector":"Industrial Goods","industry" |
NewerOlder