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
import base64 | |
import os | |
import json | |
from sqlalchemy import create_engine | |
path = os.path.expanduser('~/Library/Containers/li.zihua.medis/Data/Library/Application Support/Medis/Local Storage/file__0.localstorage') | |
engine = create_engine(f'sqlite:///{path}') | |
res = engine.execute("select * from main.ItemTable where `key`='favorites'").fetchone() | |
res = dict(res) | |
old = json.loads(res['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
#!/bin/bash | |
# usage: /usr/bin/certbot renew --manual-auth-hook="/root/cloudflare-update-dns.sh" --post-hook "nginx -s reload" | |
if [[ -z "$(command -v dig)" || -z "$(command -v jq)" || -z "$(command -v curl)" ]]; then | |
apt install dnsutils jq curl -y | |
fi | |
DIR="$(dirname "$0")" | |
CHALLENGE_DOMAIN="_acme-challenge.${CERTBOT_DOMAIN}" |