Skip to content

Instantly share code, notes, and snippets.

View mcthomas's full-sized avatar

Matt Thomas mcthomas

View GitHub Profile
@mcthomas
mcthomas / colorful-obsidian-canvas-connections.css
Last active August 22, 2024 03:28
CSS snippet to color bezier connections between Obsidian canvas cards. The color assignments are meant for aesthetic (determined just by the y-position of the cards). Looks great with Quorafind/Obsidian-Canvas-MindMap.
:root {
--red: hsla(0deg, 70%, 50%, 0.55);
--orange: hsla(30deg, 70%, 50%, 0.55);
--yellow: hsla(60deg, 70%, 50%, 0.55);
--green: hsla(90deg, 70%, 50%, 0.55);
--cyan: hsla(120deg, 70%, 50%, 0.55);
--blue: hsla(150deg, 70%, 50%, 0.55);
--purple: hsla(180deg, 70%, 50%, 0.55);
--magenta: hsla(210deg, 70%, 50%, 0.55);
}
@mcthomas
mcthomas / shell-dice.sh
Created August 22, 2024 04:02
Roll two dice in your terminal
dice=(⚀ ⚁ ⚂ ⚃ ⚄ ⚅)
printf '%s\n' "${dice[RANDOM % 6]}" "${dice[RANDOM % 6]}"
@mcthomas
mcthomas / yt.sh
Created August 22, 2024 04:08
Search for and play YouTube videos from your terminal. Requires ddgr and mpv.
yt (){
#!/bin/sh
if [ $1 = "q" ]; then
return
fi
query="'$*'"
isFound=0
url=""
output="$(ddgr -x --np --unsafe site:youtube.com/watch $query)\n"
clear
@mcthomas
mcthomas / dtbox.sh
Created August 23, 2024 04:15
Date and time in a colorful box for your terminal. Best as an alias.
while true; do echo "$(date '\''+%D %T'\'' | toilet -f term -F border --gay)"; sleep 1; done
@mcthomas
mcthomas / dt.sh
Created August 24, 2024 02:40
Date and time with figlet for your terminal. Best as an alias.
watch -n1 "date '\''+%D%n%T'\''|figlet -k"