Skip to content

Instantly share code, notes, and snippets.

View Zyrohex's full-sized avatar
🏠
Working from home

Jack Zyrohex

🏠
Working from home
View GitHub Profile
@Zyrohex
Zyrohex / custom.js
Last active January 28, 2024 09:08
function collapseAndAbbreviateNamespaceRefs() {
const observer = new MutationObserver((mutationList) => {
for (const mutation of mutationList) {
for (const node of mutation.addedNodes) {
if (!node.querySelectorAll) continue;
const initialNamespaceRefs = node.querySelectorAll(
'.ls-block a.page-ref[data-ref*="/"], .foldable-title [data-ref*="/"], li[title*="root/"] .page-title, a.tag[data-ref*="/"]'
);
const pageTitleRefs = node.querySelectorAll('.page-title');
@Zyrohex
Zyrohex / custom.css
Last active February 11, 2023 01:56
#main-container :not(.today-queries) .lazy-visibility .color-level > .flex.flex-col > .initial > div > .blocks-container > .lazy-visibility > div > .ls-block, .cp__right-sidebar .color-level .color-level > .flex.flex-col > .initial > div > .blocks-container > .lazy-visibility > div > .ls-block {
background-color: hsl(var(--cl-background), 0.35);
border: 0px solid hsl(var(--cl-background), 0.85);
padding-top: 10px;
padding-bottom: 10px;
margin-bottom: 15px;
border-radius: 4px;
padding-right: 5px;
}
.color-level {
@Zyrohex
Zyrohex / gruvbox-gradient.css
Last active June 13, 2022 06:25
Logseq - Gruvbox Gradient Theme w/transparency elements
@import url('https://fonts.googleapis.com/css?family=Work+Sans&display=swap');
/* GLOBAL SETTINGS */
:root {
--ls-font-family: "Work Sans";
--ls-main-content-max-width: 700px;
--ls-main-content-max-width-wide: 900px;
}
(defun nm/convert-filename-format (&optional time-p folder-path)
"Prompts user for filename and directory, and returns the value in a cleaned up format.
If TIME-P is t, then includes date+time stamp in filename, FOLDER-PATH is the folder
location to search for files."
(let* ((file (replace-in-string " " "-" (downcase (read-file-name "select file: " (if folder-path (concat folder-path) org-directory))))))
(if (file-exists-p file)
(concat file)
(if (s-ends-with? ".org" file)
(concat (format "%s%s" (file-name-directory file) (if time-p (concat (format-time-string "%Y%m%d%H%M%S-") (file-name-nondirectory (downcase file)))
(concat (file-name-nondirectory (downcase file))))))