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
# Pico_Victron_BT.py | |
# | |
# © Swâmi Petaramesh 2024 | |
# | |
# This program is free software: you can redistribute it and/or modify it under the terms | |
# of the GNU General Public License as published by the Free Software Foundation, | |
# either version 3 of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | |
# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
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 | |
# find all video files without thumbnail and create thumbnails remotely (I have a nodered API that can receive the video file and return the thumbnail) | |
# I run this as a cronjob every day | |
db="" | |
host="" | |
user="" | |
pw="" | |
remote_ffmpeg="" | |
mysql -h $host -P 3306 -D$db -u$user -p$pw -se 'SELECT id,path FROM `piwigo_images` where representative_ext is null and right(file,3) = "mp4"' | while read -r id value; |
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
additional power supply 3.3v!! | |
linux!! | |
esptool.py | |
mode dout | |
esptool.py --port /dev/ttyUSB0 write_flash -fm dout 0x000 ESPEasy_R147_1024.bin -fs 1MB |
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/bin/python | |
# Author Georg Peters ([email protected]) | |
import requests | |
import json | |
import time | |
import os | |
url = 'https://min-api.cryptocompare.com/data/price' | |
result = 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
# how to renew certificates with nextcloud in place. | |
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on | |
# wait 5min | |
sudo service apache2 stop | |
sudo certbot renew --dry-run # ohne dry-run wenn normaler renewal | |
sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off | |
sudo service apache2 start |
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/bin/python | |
# coding: utf8 | |
### imports (Pakete evtl. mit "sudo pip install --upgrade requests" installieren!) | |
import requests | |
import hmac |
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 | |
# | |
# Simple backup script for jottacloud and owncloud/git. | |
# Created by Georg Peters (https://lane6.de) | |
# Version 1.1 | |
# Previous version at: https://lane6.de/posts/how-to-setup-a-simple-online-backup-with-duply-and-owncloud | |
# Use: ./backup.sh owncloud | |
# Check if backup if running | |
if [[ -f /tmp/backup.running ]]; then |
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/sh | |
### BEGIN INIT INFO | |
# Provides: fail2ban | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $time $network $syslog iptables firehol shorewall ipmasq arno-iptables-firewall iptables-persistent ferm | |
# Should-Stop: $network $syslog iptables firehol shorewall ipmasq arno-iptables-firewall iptables-persistent ferm | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start/stop fail2ban |
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
Btw. I compiled the 0.7.06 version (manually), downloaded https://raw.githubusercontent.com/havardgulldahl/jottalib/master/src/duplicity-backend.py into ````duplicity/backends```` renamed it to ````jottabackend.py```` and installed duplicity using ````sudo python setup.py install```` Now I use a duply profile with a pre and post script to set the Environment (````export JOTTACLOUD_USERNAME="username" + JOTTACLOUD_PASSWORD="password"````) | |
You then have to use ````sudo -E duply ...```` to keep the environment variables. |
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
<!-- | |
Change API Token | |
Change URL | |
--> | |
<html lang="en"> | |
<head> | |
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.0/sweetalert.min.js"></script> <!-- for nice alerts --> | |
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.0/sweetalert.min.css"> | |
</head> |
NewerOlder