Skip to content

Instantly share code, notes, and snippets.

View channely's full-sized avatar
♠️
7

蝉闹外 channely

♠️
7
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,

@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
@oxUnd
oxUnd / install-php.md
Last active October 6, 2022 12:24
Mac下安装php-cgi

Mac下安装php-cgi

mac下安装php-cgi有多种方法,这里只介绍比较简单的两个方法;

  • 用brew安装
  • 直接下载安装XAMPP

用brew安装

如果安装了xcode,那么推荐使用brew来安装php。详细使用方法见官网,这里只说明如何装php-cgi;

  1. 在3001服务器下包含“用户注册”、“登录”页面以及“welcome”页面
  2. “用户注册”页面包含用户名输入框,密码输入框和一个【register】按钮,密码输入框中的内容不明文显示
  3. “用户登录”页面包含用户名输入框,密码输入框和一个【login】按钮,密码输入框中的内容不明文显示
  4. “Welcome”页面显示成功注册/登录的用户的用户名,如:Welcome, Mike!