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 | |
TODAY_DAY=$(date +%a | tr '[:upper:]' '[:lower:]') | |
echo "Reading Container in /pools/LXC-Backup" | |
for VMID in $(pvesh get /pools/LXC-Backup/ --output-format json-pretty | jq '.members | .[].vmid'); | |
do | |
if [[ $(pct list | grep $VMID) == *"$VMID"* ]] | |
then | |
echo "CT $VMID - Delete Snapshot" | |
pct delsnapshot $VMID "auto_snap_$TODAY_DAY" |
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
name: Azure App Service CD | |
on: | |
workflow_dispatch: | |
registry_package: | |
types: | |
- updated | |
- published | |
jobs: |
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
db = pymysql.connect(host="localhost",user="root",password="****",database="nextcloud",cursorclass=pymysql.cursors.DictCursor) | |
with db: | |
with db.cursor() as cursor: | |
sql = "SELECT carddata,uri FROM oc_cards WHERE addressbookid='5';" | |
cursor.execute(sql) | |
result = cursor.fetchall() | |
for item in result: | |
vcard = open("/tmp/restored_vcards/"+item["uri"],"w") | |
vcard.write(item["carddata"].decode("utf-8")) | |
vcard.close() |
OlderNewer