Skip to content

Instantly share code, notes, and snippets.

@wbsch
wbsch / on-add_inline_tags.py
Last active September 4, 2015 05:53
Proof of concept for a Taskwarrior on-add hook that allows for "inline tags" when adding tasks
#!/usr/bin/env python
#
# PoC for "inline tags", as described in TW-1357
# https://bug.tasktools.org/browse/TW-1357
#
# Turns
# $ task add I saw @bob in the @garden
# Into the equivalent of
# $ task add I saw bob in the garden +bob +garden
@wbsch
wbsch / on-exit_git.py
Last active November 16, 2020 15:33
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.
#!/usr/bin/env python3
#
# Save as on-add_annotate.py in hooks directory, then:
# $ chmod +x ~/.task/hooks/on-add_annotate.py
#
# Anything after "annotate:" in a new task's description is added as an
# annotation:
# $ task add this is the description annotate:this is an annotation
import json
@simonmichael
simonmichael / .bashrc.task
Last active January 18, 2022 17:55
taskwarrior config 2016/01
# Simon's taskwarrior aliases
########################################
# general commands
alias t="task"
alias ta="task add"
alias td="task done"
alias t-="task delete"
alias tm="task modify"
@simonmichael
simonmichael / envelope-budgeting.journal
Last active October 15, 2023 08:12
envelope budgeting example
; An example of YNAB-ish envelope budgetting with hledger/ledger
; cf https://github.com/simonmichael/hledger/issues/315
; Using accounts like the following:
;
; assets
; business
; bank
; wf
; bchecking
@chriscz
chriscz / timewn.py
Last active January 6, 2021 02:35
A python script to notify you of your current TimeWarrior task
#!/usr/bin/env python
# Notifies the user of the curently active TimeWarrior task every m minutes (default 10min).
# Requirements
# - python 2.7
# - pynotify
# Usage:
# python timewn.py [optional seconds]
import sys
import pynotify
@chriscz
chriscz / filemonitor.py
Last active April 8, 2022 15:20
Python snippet for monitoring where files were opened
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
@linuxcaffe
linuxcaffe / on-exit_git.py
Created November 24, 2016 05:41 — 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.
@enpassant
enpassant / vimwiki2html.md
Last active November 15, 2023 01:04
Convert VimWiki to HTML (markdown, mediawiki)

With this wiki2html.sh bash script and pandoc program, you can convert markdown to html.

Usage: In the vim list section of the .vimrcfile, include options:

let g:vimwiki_list = [{'path': ‘your_wiki_place',
  \ 'path_html': ‘wiki_html_location’,
  \ 'syntax': 'markdown',
 \ 'ext': '.md',