Skip to content

Instantly share code, notes, and snippets.

View renelinked's full-sized avatar

René renelinked

View GitHub Profile

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,

@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@njh
njh / house.example.net.conf
Created January 21, 2016 13:09
Proxying Node-Red through Nginx
server {
server_name house.example.net;
listen 1.2.3.4:80 default_server;
listen [2001:1234:ffff::1]:80 default_server;
add_header Cache-Control "public,max-age=31536000";
return 301 https://$server_name$request_uri;
}
map $ssl_client_s_dn $ssl_username {