Refers:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "${OPENAI_API_KEY:-}" ]; then | |
export OPENAI_API_KEY="$(gopass show key/openai.com/personal)" | |
fi | |
system_message="You are a helpful assistant who writes short git commit messages." | |
user_message="Write the commit message for the following changes: | |
$(git diff --cached)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
set -u | |
[ -n "${DEBUG:-}" ] && set -x || true | |
ALL_CATEGORIES=" | |
ΓFA Family Album | |
ΓFE Family Event | |
ΓFT Family Travel |
GitHub requires extra escaping on \{
and \;
.
markdown
$$
HPS_{i} = \left \\{
\begin{aligned}
& HPS_{i-1} \times \frac{1}{\tau} \\;, & \overline{HPS_{i}} \lt \frac{1}{\tau} HPS_{i-1} \\
& HPS_{i-1} \times \frac{1}{\tau} \\;, & \overline{HPS_{i}} \gt \tau HPS_{i-1} \\
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll("a.cached").forEach(async (a) => { | |
const cacheResp = await fetch(a.href); | |
const htmlText = await cacheResp.text(); | |
const doc = new DOMParser().parseFromString(htmlText, "text/html"); | |
const iframes = doc.querySelectorAll("body > iframe"); | |
const img = document.createElement("img"); | |
img.setAttribute("src", iframes[1].src); | |
img.setAttribute("style", "max-width: 100%"); | |
a.innerHTML = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Hide aliases in read mode */ | |
.frontmatter-container { | |
display: none; | |
} | |
/* Hide left ribbon bar */ | |
.workspace-ribbon.mod-left { | |
display: none; | |
} | |
.is-hidden-frameless:not(.is-fullscreen):not(.is-popout-window) .workspace-tabs.mod-top-left-space .workspace-tab-header-container { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extra("tex.shortauthor").transliterate.clean.lower.len+year+title.nopunct.clean.skipwords.select(1,2) | auth.lower.len+year + title.nopunct.clean.skipwords.select(1,2) | "anon" + year + title.nopunct.clean.skipwords.select(1,3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec 'digraphs AH ' .. 0x27A4 | |
noreabbrev vvah ➤ | |
noreabbrev vveop ∎ | |
noreabbrev vvref ※ | |
noreabbrev vvreturn ↩︎ | |
noreabbrev vvsec § | |
noreabbrev vvsharp ♯ | |
noreabbrev vvspace ␣ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const JSON_RPC_ENDPOINT = "http://localhost:23119/better-bibtex/json-rpc"; | |
const HEADERS = { | |
"User-Agent": "Obsidian", | |
"Zotero-Allowed-Request": "true", | |
}; | |
module.exports = async (params) => { | |
const { | |
app: { workspace, vault }, | |
} = params; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import fileinput | |
import re | |
from dataclasses import dataclass, field | |
ANNOTATION_RE = re.compile(r""" | |
“(.*)” | |
(\ \(\[.*\]\(.*\)\))+ | |
(?:\ (.*))? |