Skip to content

Instantly share code, notes, and snippets.

@basilioss
basilioss / tokyo-night.css
Created September 16, 2023 18:16
Tokyo Night theme for Obsidian Minimal theme
.theme-dark {
--color-red-rgb: 247, 118, 142;
--color-orange-rgb: 255, 158, 100;
--color-yellow-rgb: 224, 175, 104;
--color-green-rgb: 158, 206, 106;
--color-cyan-rgb: 125, 207, 255;
--color-blue-rgb: 122, 162, 247;
--color-purple-rgb: 187, 154, 247;
--color-pink-rgb: 255, 117, 160;
--color-red: #f7768e;
@basilioss
basilioss / brightness-control.sh
Last active July 13, 2022 17:17 — forked from Blaradox/brightnessControl.sh
Notifications for brightness and volume, using dunstify
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightness-control.sh up
# $ ./brightness-control.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a
@basilioss
basilioss / rollower-todo.js
Last active September 12, 2024 02:18
Obsidian template to rollover incomplete todo items from the previous daily note
<%*
// v1.1: Fixed the error when inserting the template, when a note for the previous day does not exist
const previousDay = moment(tp.file.title, "YYYY-MM-DD").subtract(1, "days").format("YYYY-MM-DD")
const nextDay = moment(tp.file.title, "YYYY-MM-DD").add(1, "days").format("YYYY-MM-DD")
tR += "# " + tp.file.title + "\n"
%>
<< [[<% previousDay %>]] | [[<% nextDay %>]] >>
@basilioss
basilioss / imdb-frontmatter.js
Last active December 9, 2022 18:34
This is an Obsidian Templater script that generates frontmatter from IMDb link
---<%*
// v1.3: Fix error if imdbRating is undefined
// Get page source
let url = await tp.system.clipboard()
url = url.replace(/\?.*$/g,"") // remove unnecessary part after '?'
let page = await tp.obsidian.request({url})
let p = new DOMParser()
let doc = p.parseFromString(page, "text/html")
// Aliases for querySelector
@basilioss
basilioss / goodreads-frontmatter.js
Created April 8, 2022 12:32
This is an Obsidian Templater script that generates frontmatter for literature notes from Goodreads link
---<%*
let url = await tp.system.clipboard()
let page = await tp.obsidian.request({url})
let p = new DOMParser()
let doc = p.parseFromString(page, "text/html")
let $ = s => doc.querySelector(s)
let $A = s => doc.querySelectorAll(s)
%>
title: "<% $("h1[id='bookTitle']").innerHTML.trim() %>"
authors: [<%* let authors = $A("span[itemprop=name]")