Skip to content

Instantly share code, notes, and snippets.

@mybedhome
mybedhome / gist:7550d63ed1b8913b451a6daa8f4ae86b
Created April 22, 2023 12:37
匹配字符串${}括号里的内容
const str = '{"a": "${默认:发起人}", "b": "${點认:组织}", "c": "${默认: 标题}"}';
const regex = /\$\{([^}]+)\}/g;
const matches = str.match(regex);
console.log(matches); // 输出 ["${默认:发起人}", "${點认:组织}"]
const str2 = matches.join("");
console.log(str2)
const regex2 = /[^\$\{\}]+/g;

How to setup a practically free CDN

I've been using [Backblaze][bbz] for a while now as my online backup service. I have used a few others in the past. None were particularly satisfactory until Backblaze came along.

It was - still is - keenly priced at a flat $5 (£4) per month for unlimited backup (I've currently got just under half a terabyte backed-up). It has a fast, reliable client. The company itself is [transparent about their operations][trans] and [generous with their knowledge sharing][blog]. To me, this says they understand their customers well. I've never had reliability problems and everything about the outfit exudes a sense of simple, quick, solid quality. The service has even saved the day on a couple of occasions where I've lost files.

Safe to say, I'm a happy customer. If you're not already using Backblaze, [I highly recommend you do][recommend].

Taking on the big boys with B2

{"lastUpload":"2020-06-19T05:10:49.745Z","extensionVersion":"v3.4.3"}