A widget for Obsidian bringing together tasks from the entire vault of priority above medium.
The 3 buttons allow to switch their grouping:
- by file
- by priority
Bash script to convert all ChatGPT conversations from .json to .csv, for example to import into Notion as a database.
jq
use_flake './flake.nix' |
v() { | |
# runs nvim in a nix-shell with nodejs_20 | |
# sets NPM_GLOBAL_DIR so no sudo is needed to install global npm packages | |
NODE_STR="nodejs_20" | |
NPM_GLOBAL_DIR="/home/$USER/.npm-global/$NODE_STR" | |
mkdir -p $NPM_GLOBAL_DIR | |
echo "running lvim $1" | |
echo "within nix-shell -p $NODE_STR" | |
PATH=$NPM_GLOBAL_DIR/bin:$PATH NPM_CONFIG_PREFIX=$NPM_GLOBAL_DIR nix-shell -p $NODE_STR --run "lvim $1" | |
} |
use nix |
// Svelte flash animation for new elements | |
// source: https://learn.svelte.dev/tutorial/svelte-options | |
export default function flash(element) { | |
requestAnimationFrame(() => { | |
element.style.transition = 'none'; | |
element.style.color = 'rgba(255,62,0,1)'; | |
element.style.backgroundColor = 'rgba(255,62,0,0.2)'; | |
setTimeout(() => { |
<script lang="ts"> | |
import { derived, readable, writable } from 'svelte/store' | |
type States = 'view' | 'edit' | |
const state = writable<States>('view') | |
const _substate = derived(state, ($state) => { | |
if ($state === 'edit') return writable<{ item?: number }>({}) | |
return readable(null) | |
}) |
extractRecordOptions(anyZodSchema)
generates automatically a correct object { fields: "...", expand: "..." }
which can be passed to the pocketbase sdk.
We can use the same schema to parse/validate and strongly type the response.