NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.
If you are not into long explanations, see [Paolo Bergantino’s answer][2].
| # Python ascii codec can't decode and unicode mess | |
| # | |
| # check this out https://pythonhosted.org/kitchen/unicode-frustrations.html | |
| # and this http://www.joelonsoftware.com/articles/Unicode.html | |
| # | |
| # The short of it is this | |
| # 1. If you can, always set PYTHONIOENCODING=utf8 before you start your python programs. | |
| # 2. If you can't or you can't ensure this, always use the following lambda _u to get unicode text | |
| # whereever you convert to strings (str.format, str % etc.) | |
| # |
| # good git book | |
| http://git-scm.com/book | |
| # Discard uncommitted changes in a specific file | |
| git checkout file_name | |
| # Clear everything not in repo | |
| git checkout -- . | |
| # A way to quickly move to the previous commit in a git branch. This also way for "deleting" last commit. |
| """ | |
| Python script to interact with existing Windows Task Scheduler tasks. | |
| CLI usage: | |
| python windows_task_scheduler.py {enable|disable|run} -t "TaskName" | |
| import usage: | |
| import windows_task_scheduler as wts | |
| wts.enable_task(task_name='TaskName') | |
| wts.disable_task(task_name='TaskName') |