Skip to content

Instantly share code, notes, and snippets.

View jenningsb2's full-sized avatar

Bailey Jennings jenningsb2

View GitHub Profile
@jenningsb2
jenningsb2 / baileys-obsidian-method.md
Last active February 27, 2024 19:55
Some simple things to keep in mind when starting out with Obsidian

Obsidian Workflow Primitives

  • Optimize for speed of capture, speed of retrieval, and then organization, in that order.
  • Just because Obsidian can do something (because it can basically do anything) doesn't mean it should. Think of Obsidian as Apple Notes with super powers. Don't overcomplicate things.
  • If in doubt, just create a new file. Don't be afraid to create new files even for small things. You can always 'update' or merge them with other files later (look for 'merge' in the command palette).
  • Use a single 'scratch-type' note as your home base, and put most of your todos there. I use the Weekly Note from the Periodic Notes plugin as my homepage.
    • Tip: I use the 'Homepage' plugin to make my Weekly Note my 'default state'
      • image
    • See: https://stephango.com/todos
    • Specific tasks associated with a project can go on the project-specific
@jenningsb2
jenningsb2 / headingPrefix.css
Last active October 29, 2023 18:04
Obsidian Heading Prefix
.HyperMD-header:not(.cm-active) .cm-header.cm-header-1::before,
.HyperMD-header:not(.cm-active) .cm-header.cm-header-2::before,
.HyperMD-header:not(.cm-active) .cm-header.cm-header-3::before,
.HyperMD-header:not(.cm-active) .cm-header.cm-header-4::before,
.HyperMD-header:not(.cm-active) .cm-header.cm-header-5::before,
.HyperMD-header:not(.cm-active) .cm-header.cm-header-6::before,
.markdown-reading-view h1::before,
.markdown-reading-view h2::before,
.markdown-reading-view h3::before,
@jenningsb2
jenningsb2 / logseq-asset-clean-up.py
Last active April 18, 2022 05:29
Small script that loops through all of the files in your graphs asset folder, then searches your pages and journals files for references to them. If the asset file isn't referenced anywhere, it is deleted.
from multiprocessing.connection import wait
from os import listdir
import os
from os.path import isfile, join
from time import time
mygraphpath = "/Users/baileyjennings/Dropbox/Mac/Documents/baileys-mind-new-local"
@jenningsb2
jenningsb2 / present-header-mark.css
Last active January 29, 2022 20:50
A small addition that adds a little descriptor indicating what heading size is being used
div.HyperMD-header.HyperMD-header-1.cm-line > .cm-fold-indicator > div.collapse-indicator.collapse-icon::after {
content: "H1";
}
div.HyperMD-header.HyperMD-header-2.cm-line > .cm-fold-indicator > div.collapse-indicator.collapse-icon::after {
content: "H2";
}
div.HyperMD-header.HyperMD-header-3.cm-line > .cm-fold-indicator > div.collapse-indicator.collapse-icon::after {
content: "H3";
@jenningsb2
jenningsb2 / LogseqImagesToAssetFolder.py
Last active January 15, 2022 13:39 — forked from lezuber/LogseqImagesToAssetFolder.py
Download Logseq repository images to local asset folder
#!/usr/bin/env python
# coding: utf-8
# What is this?
# This script is for logseq webapp users that want to switch to the local version.
# It will download all images that are linked inside your graph and store them in the local "/assets/" folder.
# Remarks
# 1. Only supports Markdown files (for now)
@jenningsb2
jenningsb2 / logseq-nord.css
Last active December 10, 2021 17:42
A hacked together port of the Nord theme css for Logseq
@import url("https://fonts.rcvd.io/iA Writer/stylesheet.css");
@import url("https://cdn.jsdelivr.net/gh/pengx17/logseq-dev-theme@main/bullet_threading.css");
/* Block threading */
:root {
--ls-block-bullet-threading-width: 2px;
}
/* Nord Color Palette */
@jenningsb2
jenningsb2 / custom.css
Last active October 30, 2023 07:13
My current CSS theme for Logseq
@import url("https://fonts.rcvd.io/iA Writer/stylesheet.css");
:root {
--highlight-color: #ffdb8a;
}
a.tag[data-ref="important"] {
border: 1px solid currentColor;
background-color: var(--ct-block-reference-background);
padding: 0 4px;
@jenningsb2
jenningsb2 / linkicon
Last active December 13, 2020 21:19
Adds a link icon after all URLs in Roam
div.roam-article span > a:not(.rm-alias-page):after {
content: "";
display: inline-block;
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZyBmaWxsPSIjMzM3QUI3Ij48cGF0aCBkPSJNNiAxMmwxLjA2NTgxZS0xNCAxLjUwOTk2ZS0wN2M4LjMzOTI3ZS0wOC41NTIyODUuNDQ3NzE1IDEgMSAxaDkuNWwtNC4zNzExNGUtMDgtMS43NzYzNmUtMTVjLjU1MjI4NSAyLjQxNDExZS0wOCAxLS40NDc3MTUgMS0xIDIuNDE0MTFlLTA4LS41NTIyODUtLjQ0NzcxNS0xLTEtMWgtOS41bC00LjM3MTE0ZS0wOCAzLjU1MjcxZS0xNWMtLjU1MjI4NSAyLjQxNDExZS0wOC0xIC40NDc3MTUtMSAxIDAgMCAwIDguODgxNzhlLTE1IDAgOC44ODE3OGUtMTVaIj48L3BhdGg+PHBhdGggZD0iTTguMiAxNC43MjJsMS4wMDg3OWUtMDctOC4yMjU5MWUtMDhjLS42MjEwMzguNTA2NDA2LTEuMzk4NjcuNzgxNDA3LTIuMi43NzhsLTEuNTI5OWUtMDctMy41NTI3MWUtMTVjLTEuOTMzLTguNDQ5NGUtMDgtMy41LTEuNTY3LTMuNS0zLjUgOC40NDk0ZS0wOC0xLjkzMyAxLjU2Ny0zLjUgMy41LTMuNWwxLjM2NDc3ZS0wNy01LjAzNzkzZS0xMGMuODAxNDIxLS4w
@jenningsb2
jenningsb2 / roam-obsidian-date-convert.py
Created June 17, 2020 12:54
Looks through every file and finds strings that match the date format [[April 20th, 2020]] and converts them to Obsidian sort friendly format [[2020-04-20]].
import re
import os
from dateutil.parser import parse
path = '' #insert file path to your vault here
for root, dirs, files in os.walk(path):
for f in files:
fullpath = (os.path.join(root, f))
with open(fullpath, 'r') as f: #opens each .md file
contents = f.read() #reads the contexts