Skip to content

Instantly share code, notes, and snippets.

@davelevine
davelevine / how-to-cache-b2-content-with-cloudflare.md
Last active April 7, 2026 12:08
How to Properly Cache Content Hosted on Backblaze B2 with Cloudflare

How to Properly Cache Content Hosted on Backblaze B2

Summary

Because I use Cloudflare to manage my domains and Backblaze for backups, it only made sense to take advantage of their Bandwidth Alliance for creating my own CDN. This has been incredibly helpful for image hosting for this knowledge base, however, I recently noticed that caching wasn't working as it should.

The Problem

The overall problem started when I was adding a parking page for a domain I recently purchased. The background image was hosted on B2 and the image was supposed to be cached by Cloudflare. However, each time the page loaded, it would pull the image from the origin instead of the cache. I checked this on my knowledge base and found it was doing the same thing.

@rootfs
rootfs / Windows-qemu-KVM.10.xml
Created January 31, 2021 22:04
Windows 10 qemu/kvm optimizations CPU usage #virt-manager
<domain type="kvm">
<!-- https://www.reddit.com/r/VFIO/comments/80p1q7/high_kvmqemu_cpu_utilization_when_windows_10/ -->
<!-- https://github.com/duncanthrax/scream -->
<!-- https://gitlab.com/YuriAlek/vfio -->
<!-- https://github.com/PiMaker/Win10-VFIO -->
<!-- https://gitlab.com/YuriAlek/vfio -->
<!-- https://github.com/sk1080/nvidia-kvm-patcher -->
<!-- https://github.com/T-vK/MobilePassThrough -->
@ciiqr
ciiqr / dispatch.sh
Last active December 8, 2025 01:09
github actions, repository_dispatch with client_payload
# TODO: replace :token, :user, and :repo
curl -H "Authorization: token :token" \
-H 'Accept: application/vnd.github.everest-preview+json' \
"https://api.github.com/repos/:user/:repo/dispatches" \
-d '{"event_type": "awesomeness", "client_payload": {"foo": "bar"}}'

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@imba-tjd
imba-tjd / .Cloud.md
Last active May 4, 2026 23:25
☁️ 一些免费的云资源

  • IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装。PaaS提供语言环境和框架(可以自己选)。SaaS只能使用开发好的软件(卖软件本身,如税务会计、表格文字处理)。BaaS一般类似于非关系数据库,但各家不通用
  • 云服务的特点:零前期成本 & 按需付费 & 弹性(类似于租,可随时多加、退掉;但没有残值)、高可用(放在机房中,不同AZ间水电隔离)

如果你想补充内容,建议优先给 free-for-dev 提PR,还能混个高星repo的contributor,没必要加到本列表里。
If you want to make improvements, I would recommend you contributing to free-for-dev rather than this list.

其他人的集合

@lixingcong
lixingcong / sysctl.conf
Last active April 28, 2026 00:51
适用于个人的Linux VPS内核调优
# source from phuslu
# https://phus.lu/sysctl.conf
# bbr
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
net.ipv4.tcp_retries2 = 8
# 系统所有进程一共可以打开的文件数量, 每个套接字也占用一个文件描述字
@TobleMiner
TobleMiner / pivot_services.sh
Last active February 3, 2024 17:29
OpenWrt switch to ramfs
#!/bin/sh
. /lib/functions.sh
. /lib/functions/system.sh
kill_remaining() { # [ <signal> [ <loop> ] ]
local loop_limit=10
local sig="${1:-TERM}"
local loop="${2:-0}"
@Brainiarc7
Brainiarc7 / ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md
Last active November 23, 2025 08:19
This gist will generate an Intel QSV-enabled FFmpeg build using the open source Intel Media SDK. Testbed used: Ubuntu 18.04LTS. A fallback is also provided for the intel vaapi driver where needed.

Build FFmpeg with Intel's QSV enablement on an Intel-based validation test-bed:

Build platform: Ubuntu 18.04LTS

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

Install baseline dependencies first (inclusive of OpenCL headers+)

@mrbar42
mrbar42 / README.md
Last active January 23, 2026 05:01
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster