Skip to content

Instantly share code, notes, and snippets.

View heguro's full-sized avatar

heguro

View GitHub Profile
@heguro
heguro / nosaray-copy-all-note-ids-bookmarklet.js
Last active March 30, 2023 10:37
nosaray-copy-all-ids-bookmarklet (unofficial, temporary)
javascript:(()=>{const e=document.createElement("button");Object.assign(e.style,{position:"fixed",top:"0",left:"0",width:"20rem",height:"2rem"}),e.innerText="<< click to copy all IDs! >>",e.onclick=()=>{const o=[],t=window.prompt,n=document.execCommand;window.prompt=(e,t)=>{o.push(t)},document.execCommand=void 0;const c=[...document.querySelectorAll("[aria-label='copy note id']")];for(const e of c)e.click();window.prompt=t,document.execCommand=n;const m=document.createElement("textarea");m.value=o.join("\n"),document.body.append(m),m.select(),document.execCommand("copy"),m.remove(),e.remove()},document.body.append(e)})();
@heguro
heguro / keybase.md
Created October 16, 2021 19:31
keybase.md

Keybase proof

I hereby claim:

  • I am heguro on github.
  • I am heguro (https://keybase.io/heguro) on keybase.
  • I have a public key whose fingerprint is 668A B571 590F 1A59 627E DDE0 7DBE 54C7 A806 997B

To claim this, I am signing this object:

@heguro
heguro / cf-workers-http-to-https-backblaze.js
Created October 9, 2021 13:24
cloudflare workers script; http to https redirect, with /file/<bucket-name>/ deletion for backblaze b2. https://scrapbox.io/heguro/Backblaze_B2_+_Cloudflare
addEventListener("fetch", (event) => {
event.respondWith(
handleRequest(event.request).catch(
(err) => new Response(err.stack, { status: 500 })
)
);
});
/**
* @param {Request} request
/* Windowsなら %appdata%\thedesk\custom.css に記述 */
/* フォントサイズ 11px に合わせて設定 */
/* 狭い画面でプロフィール表示したとき「もっと」が隠れて下に進めないのを回避する */
/* アプデである程度の狭さなら隠れないようになったのでコメントアウト */
/* #my-data-nav > a.btn {
width: 3rem;
} */
/* 長文自動折り畳みを薄く */