Skip to content

Instantly share code, notes, and snippets.

@GitMurf
GitMurf / obsidian.live-preview.css.block-ref-inline.css
Last active April 9, 2025 15:21
CSS for inline block references that works for both NEW CM6 Live Preview and also Preview Mode for both CM5 (Legacy) and CM6 (New)
:root {
/* #7159de (similar to Obsidian purple) */
--block-ref-line-color: grey;
--block-ref-line-type: solid;
--block-ref-line-size: 2px;
/* Set to "inherit" for no bg color */
--block-ref-hover-bg-color: #d4d0d026;
}
/*
@zsviczian
zsviczian / meeting-note.md
Last active April 10, 2025 08:09
Daily note taking scripts

<%* /*

*/
const view = app.workspace.activeLeaf.view;
const editor = view.editor;
const curLineNum = editor.getCursor().line;
const curLineText = editor.getLine(curLineNum);
const title = tp.file.title;
const today = title.match(/\d{4}\-\d{2}\-\d{2} .+/) //are we on the DNP?
@marcus-crane
marcus-crane / youtube.js
Created May 8, 2022 11:57
Obsidian script for creating a note with a YouTube video embed in it
async function youtube (tp) {
const url = await tp.system.clipboard()
const response = await fetch(`https://youtube.com/oembed?url=${url}&format=json`)
const data = await response.json()
const title = data.title.replaceAll("", "").replaceAll('"', '').replaceAll("\\", "").replaceAll("/", "").replaceAll("<", "").replaceAll(">", "").replaceAll(":", "").replaceAll("|", "").replaceAll("?", "")
tp.file.rename(title)
const regex = /v=(.*)/gm;
const m = regex.exec(url)
return m[1]
}
@galaxia4Eva
galaxia4Eva / kitty+page.lua
Last active May 10, 2025 14:47
nvim pager for kitty history
return function(INPUT_LINE_NUMBER, CURSOR_LINE, CURSOR_COLUMN)
print('kitty sent:', INPUT_LINE_NUMBER, CURSOR_LINE, CURSOR_COLUMN)
vim.opt.encoding='utf-8'
vim.opt.clipboard = 'unnamed'
vim.opt.compatible = false
vim.opt.number = false
vim.opt.relativenumber = false
vim.opt.termguicolors = true
vim.opt.showmode = false
vim.opt.ruler = false