Skip to content

Instantly share code, notes, and snippets.

View tyrm's full-sized avatar

Tyr Mactire tyrm

View GitHub Profile
#!/bin/bash
set -e
#imports
. /etc/default/backup
# config
NAME=$1
blueprint:
name: "Z-Wave JS Scene Controller HANK Electronics SCN04"
description: Create automations for the HANK Electronics SCN04 4 button scene controller using the Z-WAVE JS integration.
domain: automation
input:
scn04:
name: HANK Electronics scene controller
description: "List of available HANK Electronics SCN04 scene controllers."
selector:
device:
@tyrm
tyrm / mastodon_db_backup.sh
Last active December 24, 2022 21:22
DB Backup
#!/bin/bash
set -e
. /etc/default/backup
INSTANCE=$1
case $INSTANCE in
#!/bin/bash
CONTAINER_NAME=$1
LOG_FILE=/var/log/mastodon/$CONTAINER_NAME.log
echo >> $LOG_FILE 2>&1
date >> $LOG_FILE 2>&1
echo "statuses remove" >> $LOG_FILE 2>&1
docker exec $CONTAINER_NAME bin/tootctl statuses remove >> $LOG_FILE 2>&1
baclklight endpoint:
/sys/class/backlight/10-0045/brightness
https://www.speedtest.net/result/13310518755.png
package main
import (
"fmt"
"github.com/go-rod/rod"
"github.com/go-rod/rod/lib/launcher"
"github.com/google/uuid"
"github.com/h2non/filetype"
"os"
)
package metrics
// Collector collects metrics from the feditools.
type Collector interface {
Close() error
NewDBQuery(name string) DBQuery
NewDBCacheQuery(name string) DBCacheQuery
NewGRPCRequest(method string) GRPCRequest
NewHTTPRequest(method, path string) HTTPRequest
1. 🇮🇹 Italy: Mahmood & Blanco – “Brividi”
2. 🇬🇧 United Kingdom: Sam Ryder – “Space Man”
3. 🇦🇲 Armenia: Rosa Linn - “Snap”
4. 🇳🇴 Norway: Subwoolfer – “Give That Wolf a Banana”
5. 🇵🇱 Poland: Ochman – “River”
@tyrm
tyrm / .env.mastodon
Last active April 28, 2022 03:34
Mastodon Docker
# Generated with mastodon:setup on 2019-06-09 21:39:02 UTC
LOCAL_DOMAIN=<your domain>
SINGLE_USER_MODE=false
S3_ENABLED=true
S3_BUCKET=<digital ocean bucket name>
AWS_ACCESS_KEY_ID=<digital ocean bucket access key>
AWS_SECRET_ACCESS_KEY=<digital ocean bucket secret key>
S3_PROTOCOL=https