Skip to content

Instantly share code, notes, and snippets.

Avatar

David J Patrick linuxcaffe

View GitHub Profile
@enpassant
enpassant / vimwiki2html.md
Last active Nov 16, 2020
Convert VimWiki to HTML (markdown, mediawiki)
View vimwiki2html.md

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',
@linuxcaffe
linuxcaffe / on-exit_git.py
Created Nov 24, 2016 — forked from wbsch/on-exit_git.py
Proof of concept for a Taskwarrior on-exit hook that manages a git repository in ~/.task
View on-exit_git.py
#!/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.
@chriscz
chriscz / filemonitor.py
Last active Feb 10, 2017
Python snippet for monitoring where files were opened
View filemonitor.py
# 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
@chriscz
chriscz / timewn.py
Last active Oct 17, 2019
A python script to notify you of your current TimeWarrior task
View timewn.py
#!/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
@simonmichael
simonmichael / envelope-budgeting.journal
Last active Nov 1, 2019
envelope budgeting example
View envelope-budgeting.journal
; 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
@simonmichael
simonmichael / .bashrc.task
Last active Aug 21, 2019
taskwarrior config 2016/01
View .bashrc.task
# 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"
View on-add_annotate.py
#!/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
@wbsch
wbsch / on-exit_git.py
Last active Nov 16, 2020
Proof of concept for a Taskwarrior on-exit hook that manages a git repository in ~/.task
View on-exit_git.py
#!/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.
@wbsch
wbsch / on-add_inline_tags.py
Last active Sep 4, 2015
Proof of concept for a Taskwarrior on-add hook that allows for "inline tags" when adding tasks
View on-add_inline_tags.py
#!/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-add_interactivity.py
Created Mar 21, 2015
Proof of concept for an interactive Taskwarrior hook. Hackish and potentially problematic, but it works.
View on-add_interactivity.py
#!/usr/bin/env python
#
# PoC: Interactive on-add hook
import json
import sys
t = json.loads(sys.stdin.readline())
real_stdin = open("/dev/tty", "r")
You can’t perform that action at this time.