Skip to content

Instantly share code, notes, and snippets.

@flashlab
flashlab / worker.js
Last active March 7, 2024 01:50
simple cf worker to proxy jellyfin plugin repository
export default {
async fetch(request, env, ctx) {
ctx.passThroughOnException();
const url = new URL(request.url);
const uri = url.pathname.slice(1);
if (request.method != "GET" || uri.length < 3 || uri.indexOf('.') == -1 || uri == "favicon.ico" || uri == "robots.txt") {
return new Response('', { status: 405 })
} else {
if (!uri.startsWith('http')) uri = 'https://' + uri;
if (uri.endsWith('/manifest.json')) {
@flashlab
flashlab / dtjek
Last active February 6, 2024 06:48 — forked from westh/dtjek
🥞 a small distributed DNS checker – much like dnschecker.org but in your terminal, you could put it in /usr/local/bin or somewhere for easy access
#!/bin/bash
servers=(
"Cloudflare:1.1.1.1"
"Google:8.8.8.8"
"DNSpod:119.29.29.29"
"Aliyun:223.5.5.5"
"114:114.114.114.114"
"baidu:180.76.76.76"
"CNNIC:1.2.4.8"
@flashlab
flashlab / worker.js
Created November 13, 2023 08:57
cf simple worker to make tg/wx/dingding notice for qbittorrent
/**
* cf simple worker to make tg/wx/dingding notice for qbittorrent.
*
* - Required variables:
* - SITE_LIST - e.g. {"hdh": "https://xxx.org/torrents.php?search=", "ttg": "https://xxx.im/browse.php?search_field="}
* - QBIT - link for qbit webui
* - TG_HOST - "https://api.telegram.org/"
* - TG_TOKEN - botxxx:xxxx
* - TG_CHAT_ID
* - WX_HOST - "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key="
@flashlab
flashlab / tile.sh
Created August 4, 2023 10:26
genereate video contact sheet by ffmpeg
#!/bin/sh
#===============================================================================
# tile-thumbnails
# create an image with thumbnails from a video
# modified from https://github.com/NapoleonWils0n/ffmpeg-scripts/blob/master/tile-thumbnails, adapte for jellyfin docker
#===============================================================================
# dependencies:
# ffmpeg ffprobe awk