fabio / ntfy-browser-import-export
0 喜歡
0 分支
1 檔案
最後活躍
A set of scripts to backup and restore your ntfy subscriptions, settings, users and messages from a browser session
| 1 | /** |
| 2 | * ntfy exporter |
| 3 | * |
| 4 | * This saves the ntfy state in your current browser session to a JSON file that |
| 5 | * can be imported by another browser session or (only partly tested) the Android app. |
| 6 | * |
| 7 | * Save the following one-liner to your bookmarks to run it on the fly: |
| 8 | |
| 9 | javascript:(async()=>{async function dumpStore(dbName,storeName){const db=await new Promise((resolve,reject)=>{const r=indexedDB.open(dbName);r.onsuccess=()=>resolve(r.result);r.onerror=()=>reject(r.error);});const tx=db.transaction(storeName,"readonly");const store=tx.objectStore(storeName);const all=await new Promise((resolve,reject)=>{const r=store.getAll();r.onsuccess=()=>resolve(r.result);r.onerror=()=>reject(r.error);});db.close();return all;}const [subscriptions,users,notifications,settings]=await Promise.all([dumpStore("ntfy","subscriptions"),dumpStore("ntfy","users"),dumpStore("ntfy","notifications"),dumpStore("ntfy","prefs")]);const data={subscriptions,users,notifications,settings};const json=JSON.stringify(data,null,2);const blob=new Blob([json],{type:"application/json"});const url=URL.createObjectURL(blob);const a=document.createElement("a");a.href=url;a.download=`ntfy-backup-${location.host}-${new Date().toISOString().replace(/[:.]/g,"-")}.json`;document.body.appendChild(a);a.click();a.remove();URL.revokeObjectURL(url);})().catch(e=>alert(e&&e.message?e.message:String(e))); |
fabio / iptables against China
0 喜歡
0 分支
1 檔案
最後活躍
| 1 | #!/bin/bash |
| 2 | |
| 3 | # iptables -F |
| 4 | |
| 5 | # Ban the whole of China until it stops spamming |
| 6 | iptables -I INPUT -s 1.24.0.0/13 -j DROP |
| 7 | iptables -I INPUT -s 111.0.0.0/10 -j DROP |
| 8 | iptables -I INPUT -s 112.0.0.0/10 -j DROP |
| 9 | iptables -I INPUT -s 113.128.0.0/12 -j DROP |
| 10 | iptables -I INPUT -s 113.168.0.0/13 -j DROP |
fabio / pkpass2png
0 喜歡
0 分支
1 檔案
最後活躍
A shell script that converts a .pkpass ticket for wallet apps into a PNG image
| 1 | #!/usr/bin/env bash |
| 2 | set -euo pipefail |
| 3 | |
| 4 | # Usage: |
| 5 | # ./pkpass2png <pkpass_path_or_url> [output.png] |
| 6 | # |
| 7 | # Examples: |
| 8 | # ./pkpass2png ticket.pkpass out.png |
| 9 | # ./pkpass2png "https://example.com/ticket.pkpass" out.png |
fabio / Platypush+Mopidy+Termux configuration
0 喜歡
0 分支
4 檔案
最後活躍
| 1 | #!~/.config/platypush/config.yaml |
| 2 | |
| 3 | # Platypush configuration file for Termux Mopidy Notifier |
| 4 | |
| 5 | # A name for your device |
| 6 | device_id: phone |
| 7 | |
| 8 | # Enable the Web server |
| 9 | backend.http: |
| 10 | # port: 8008 |
fabio / termux-services-setup
0 喜歡
0 分支
1 檔案
最後活躍
A script that install some service management utilities in a Termux environment
| 1 | #!/data/data/com.termux/files/usr/bin/sh |
| 2 | |
| 3 | # This script installs some service management utilities in a Termux environment. |
| 4 | # |
| 5 | # You can download and directly run this script in a Termux environment through: |
| 6 | # curl -sSL https://gist.manganiello.tech/fabio/termux-services-setup/raw/HEAD/termux-services-setup.sh | sh |
| 7 | # |
| 8 | # NOTE: It requires curl and termux-services to be already installed: |
| 9 | # pkg update && pkg install curl termux-services |
fabio / # Amsterdam temperature analysis 2019-12 -> 2025-08
0 喜歡
0 分支
1 檔案
最後活躍
Temperature collected from outdoor sensors
| 1 | { |
| 2 | "cells": [ |
| 3 | { |
| 4 | "cell_type": "markdown", |
| 5 | "id": "c941d030-c927-4947-a4a2-107eae5fdbd7", |
| 6 | "metadata": {}, |
| 7 | "source": [ |
| 8 | "# Amsterdam temperature analysis 2019-12 -> 2025-08" |
| 9 | ] |
| 10 | }, |
fabio / cleanup-jpeg-from-nc-contacts
0 喜歡
0 分支
1 檔案
最後活躍
A simple script that removes big JPEG blobs from the contact cards on your Nextcloud db.
| 1 | #!/usr/bin/env python |
| 2 | |
| 3 | """ |
| 4 | A simple script that removes big JPEG blobs from the contact cards on your |
| 5 | Nextcloud db. |
| 6 | |
| 7 | :author: Fabio Manganiello <info@fabiomanganiello.com> |
| 8 | """ |
| 9 | |
| 10 | import re |
fabio / mopidy-generate-docker.sh
0 喜歡
0 分支
1 檔案
最後活躍
A script that generates docker-compose.yml and Dockerfile to run Mopidy inside of a container
| 1 | #!/bin/bash |
| 2 | |
| 3 | # This script generates a Dockerfile and a docker-compose.yml file for running |
| 4 | # Mopidy with various extensions. |
| 5 | # |
| 6 | # This is customized for my setup, so you may need to adjust it to fit the |
| 7 | # extensions that you actually need. |
| 8 | # |
| 9 | # You may also want to use a Pulse sink for audio output if you already have |
| 10 | # PulseAudio running on the host system, otherwise ALSA won't to |
上一頁
下一頁