Skip to content

Instantly share code, notes, and snippets.

@ahillio
ahillio / 11ty-related-posts-filter.md
Created May 21, 2022 12:24 — forked from cmaas/11ty-related-posts-filter.md
11ty: show related articles in a sorted way
local M = {}
local uv = vim.loop
local fn = vim.fn
local api = vim.api
function password()
fn.inputsave()
local user = fn.expand("$USER")
local pw = fn.inputsecret(string.format("password for %s: ", user))
@ahillio
ahillio / on-exit_git.py
Created November 16, 2020 15:33 — forked from wbsch/on-exit_git.py
Proof of concept for a Taskwarrior on-exit hook that manages a git repository in ~/.task
#!/usr/bin/env python
#
# PoC: Manage a git repository in ~/.task that gets updated on changes.
# Only pending.data and completed.data are included by default.
# You can use "git add" to add whatever files you want to track in your
# task folder.
#
# Inspired by https://gist.github.com/Unode/9366218
#
# Works with any Taskwarrior version that supports hooks.
@ahillio
ahillio / on-modify.blocks_attr.py
Created November 16, 2020 15:33 — forked from wbsch/on-modify.blocks_attr.py
Taskwarrior hook script that adds a "blocks:" pseudo-attribute for adding/modifying tasks.
#!/usr/bin/env python
#
# Adds the ability to add / modify tasks using a "blocks:" attribute,
# the opposite of "depends:".
#
# This script acts as an on-modify, on-add and on-launch hook at the same time.
#
### SETUP
# Save this file as
# ~/.task/hooks/on-modify.blocks_attr.py