Skip to content

Instantly share code, notes, and snippets.

View boenfu's full-sized avatar

格桑 boenfu

  • back to world
  • 00:22 (UTC +08:00)
View GitHub Profile
@boenfu
boenfu / screenshot.png
Last active March 31, 2022 04:12
盯梢首届脚本大赛
screenshot.png
@boenfu
boenfu / tushuigui.gif
Last active May 23, 2020 01:48
tushuigui
tushuigui.gif
export function a() {
}
@boenfu
boenfu / index.ts
Created June 24, 2021 06:50
CamelToDash
export type CamelToDash<
S extends string,
H = true
> = S extends `${infer S1}${infer S2}`
? S1 extends Uppercase<S1>
? H extends true
? `${Lowercase<S1>}${CamelToDash<S2, false>}`
: `-${Lowercase<S1>}${CamelToDash<S2, false>}`
: `${S1}${CamelToDash<S2, false>}`
: S;
TypeScript 14 hrs 13 mins █████████████▍░░░░░░░ 64.2%
JSON 3 hrs 15 mins ███░░░░░░░░░░░░░░░░░░ 14.7%
JavaScript 2 hrs 7 mins ██░░░░░░░░░░░░░░░░░░░ 9.6%
Markdown 1 hr 47 mins █▋░░░░░░░░░░░░░░░░░░░ 8.1%
Rust 36 mins ▌░░░░░░░░░░░░░░░░░░░░ 2.8%
🌟 Total Stars: 335
🪛 Total Commits: 1.2k
🚀 Total PRs: 55
🔎 Total Issues: 27
📦 Contributed to: 12
@boenfu
boenfu / data.js
Created April 2, 2022 08:25
timezone list
// https://www.zeitverschiebung.net/cn/all-time-zones.html
// Array.prototype.map.call(document.querySelectorAll('tbody>tr'), tr => ([tr.childNodes.item(1).textContent.trim(),tr.querySelector('a').textContent.trim()]))
export const data = [
[
"UTC-11",
"Pacific/Midway"
],
[
"UTC-11",
function image(url: string): Promise<Buffer | undefined> {
return fetch(url).then(
res => {
if (res.status !== 200) {
return undefined;
}
return res.buffer();
},
() => {