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
| # yaml-language-server: $schema=https://json.schemastore.org/lazygit.json | |
| promptToReturnFromSubprocess: false | |
| os: | |
| editPreset: "nvim" | |
| customCommands: | |
| - key: E | |
| context: commitFiles | |
| subprocess: true | |
| # - When a file is selected, open the file before the commit |
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 os | |
| import re | |
| import sys | |
| import subprocess | |
| import json | |
| from collections import namedtuple, OrderedDict | |
| import requests | |
| from requests.auth import HTTPBasicAuth |
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
| function htmlToMarkdown(input: string) { | |
| const linkRegex = /<a\s+[^>]*href="([^"]*)"[^>]*>(.*?)<\/a>/gi; | |
| return input.replace(linkRegex, '[$2]($1)'); | |
| } | |
| const TZ = 8*60*60; | |
| function formatDiscordTimestamp(input: string) { | |
| const ts = moment.utc(input, "MMMM D, YYYY at hh:mmA", "MMMM D, YYYY").unix() - TZ; | |
| return `<t:${ts}>`; | |
| } |
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) |