local function lazy_load() {
local -xr thunk="$(cat)"
# (u) removes duplicates
local -xr triggers=(${(u)@})
# Only if length of triggers is greater than zero
# otherwise the function will immediately execute.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To permanently cache the credentials | |
git config --global credential.helper store | |
# To ignore files that could cause issues across different workspaces | |
touch .gitignore | |
echo ".obsidian/cache | |
.trash/ | |
.DS_Store" > .gitignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import todoist | |
api = todoist.TodoistAPI(token='<your_token_here') | |
# Initial sync of your account | |
api.sync() | |
# Find Inbox in project - can be adapted to delete completed tasks for other projects as well | |
projects = api.projects.all() | |
inbox = next(p for p in projects if 'inbox_project' in p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
menu(){ | |
printf "1. [URL] Expecto Shorten 🪄: Get a shorten url\n" | |
printf "2. [URL] Lumbos dl 🪄: Download file in ~/dl\n" | |
printf "3. [URL] Avada Playdavra 🪄: Play videos in mpv\n" | |
printf "4. [URL] Listenmora 🪄: Play audio in mpv\n" | |
printf "5. [Image] Imagum Savum 🪄: Save clipbaord image in ~/pix/save\n" | |
printf "6. [Text] Sendkulus 🪄: Send clipboard text with tgsend script\n" | |
printf "7. [Shell] Executa 🪄: This will run any shell command\n" |
- Create a new disk image (I use VDI for compatibility with VirtualBox)
- Allocate some RAM (>6 GiB to start)
- Add some video memory and enable 3D acceleration, if needed
- Optional: Enable EFI (instead of BIOS)
- Attach
nixos-minimal
ISO for installation - Boot into the ISO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```dataviewjs | |
// find dates based on format [[YYYY-MM-DD]] | |
const findDated = (task)=>{ | |
if( !task.completed ) { | |
task.link = " " + "[[" + task.path + "|*]]"; | |
task.date=""; | |
const found = task.text.match(/\[\[([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01]))\]\]/); | |
if(found) task.date = moment(found[1]); | |
return true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/haikarainen/light | |
# | |
# Bindings for keyboard backlight | |
bindsym XF86KbdBrightnessUp exec light -As "sysfs/leds/smc::kbd_backlight" 10 | |
bindsym XF86KbdBrightnessDown exec light -Us "sysfs/leds/smc::kbd_backlight" 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Jui-Shan (Jenny) Liang <[email protected]> | |
* @param {Object} tp the `tp` object of the Templater plugin | |
* @param {Object} options options for configuring the year to generate the MOC and the file name format | |
* @param {string} options.YEAR what year to generate the MOC; default to the current year | |
* @param {string} options.YEARLY_FORMAT filename format of yearly notes; format reference: https://momentjs.com/docs/#/displaying/format/ | |
* @param {string} options.QUARTER_FORMAT filename format of quarterly notes; format reference: https://momentjs.com/docs/#/displaying/format/ | |
* @param {string} options.MONTH_FORMAT filename format of monthly notes; format reference: https://momentjs.com/docs/#/displaying/format/ | |
* @param {string} options.WEEK_FORMAT filename format of weekly notes; format reference: https://momentjs.com/docs/#/displaying/format/ | |
* @param {string} options.DAY_FORMAT filename format of daily notes; format reference: https://momentjs.com/docs/#/displaying/format/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local wezterm = require 'wezterm'; | |
return { | |
color_scheme = "Dracula", | |
-- colors = { | |
-- background = "#0c0e14", | |
-- }, | |
window_decorations = "NONE", | |
font = wezterm.font("Iosevka"), | |
font_size = 10.0, | |
-- dpi = 192.0, |