Skip to content

Instantly share code, notes, and snippets.

View tyrm's full-sized avatar

Tyr Mactire tyrm

View GitHub Profile
EXTERNAL_HOSTNAME=relay.example.com
HTTP_BIND=127.0.0.1:5000
RUNNER_CONCURRENCY=5
ENCRPYTION_KEY=longrandomstring
TOKEN_SALT=differentlongrandomstring
DB_TYPE=postgres
DB_ADDRESS=postgres
#!/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”