Skip to content

Instantly share code, notes, and snippets.

Tomas Babej tbabej

Block or report user

Report or block tbabej

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am tbabej on github.
  • I am tbabej (https://keybase.io/tbabej) on keybase.
  • I have a public key ASCQqPAYF5iEfm5DX67-NQRHaYlm0wPw_sLl3s8Ar7QbeAo

To claim this, I am signing this object:

@tbabej
tbabej / negative-low-priority-urgency.patch
Created Mar 18, 2015
Unsupported, use at your own risk.
View negative-low-priority-urgency.patch
From e5db453a74b31e244871cd95005f65493d9f64d4 Mon Sep 17 00:00:00 2001
From: Tomas Babej <tomasbabej@gmail.com>
Date: Wed, 18 Mar 2015 16:37:34 +0100
Subject: [PATCH] Task: Make L priority negative
---
src/Task.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Task.cpp b/src/Task.cpp
View on-modify-due-shiht-bug
#!/usr/bin/python
from tasklib.task import Task
task = Task.from_input(modify=True)
touched = False
if 'due' in task._original_data and 'due' in task._data:
original_due_date = task._original_data['due']
current_due_date = task['due']
View on-add-block-recurrence
#!/usr/bin/python
# Install tasklib from my hooks branch
# sudo pip install --force git+git://github.com/tbabej/tasklib@hooks2
# This hook tries to solve the problem where two TW clients create
# both child tasks of the same recurrent tasks.
# Only hook-approach that does not come up to having multiple task
# occurences in the database (albeit deleted), is to prohibit recurrent
@tbabej
tbabej / on-add-antiduplicate
Last active Aug 29, 2015
Taskwarrior on-add antiduplicate hook
View on-add-antiduplicate
#!/usr/bin/python
# Install tasklib from my hooks branch
# sudo pip install --force git+git://github.com/tbabej/tasklib@hooks2
import sys
from tasklib.task import TaskWarrior, Task
tw = TaskWarrior() # Use data_location for alternate locations, see docs
task = Task.from_input()
View on-add-default-time.py
#!/usr/bin/python
import pytz
from datetime import time
from tasklib.task import Task
LOCALTZ = pytz.timezone('Europe/Bratislava') # Your timezone
DEFAULT_TIME = time(22,0,0) # Your wanted default time
def is_local_midnight(timestamp):
You can’t perform that action at this time.