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
# This program is placed into the public domain. | |
""" | |
Gets the current version number. | |
If in a git repository, it is the current git tag. | |
Otherwise it is the one contained in the PKG-INFO file. | |
To use this script, simply import it in your setup.py file | |
and use the results of get_version() as your package version: |
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
An elegant way to manually disable (thus totally hide) an account is to edit prefs.js (make sure TB had been shut down before editing). Search for "mail.accountmanager.accounts" and edit the line like this, e.g. assuming that "account6" is the one to be disabled: | |
Before edit (account enabled): | |
user_pref("mail.accountmanager.accounts", "account1,account5,account3,account2,account4,account7,account6"); | |
After edit (account disabled): | |
user_pref("mail.accountmanager.accounts", "account1,account5,account3,account2,account4,account7"); | |
This will disable the account and completely hide it in the user interface, but preserve all account settings, servers and identities associated with the account. To reactivate it just add the account name back to the list. When you restart TB, the account and all its settings and contents will magically reappear. |
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__ = 'ricard' | |
from redmine import Redmine | |
from gitlab import Gitlab | |
from ConfigParser import ConfigParser | |
config = ConfigParser() | |
config.readfp(open('defaults.cfg')) | |
redmine = Redmine(config.get('redmine', 'url'), key=config.get('redmine', 'key') ) |
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
#!/usr/bin/env python | |
from __future__ import with_statement | |
import smtpd | |
import asyncore | |
import sys | |
import time | |
import threading | |
class FakeSMTPD(smtpd.SMTPServer): | |
def __init__(self, localaddr, remoteaddr): |