Skip to content

Instantly share code, notes, and snippets.

View ROldford's full-sized avatar

Ryan Oldford ROldford

View GitHub Profile
@ROldford
ROldford / 1-python_development_notes.rst
Last active October 21, 2018 16:19
Python project workflow notes

Development Notes: Python

Global Prerequisites

Homebrew - easy package manager for MacOS:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@ROldford
ROldford / timeStampMethod
Created July 6, 2013 22:50
Applescript method for creating time stamps. Great for use with filenames! Adapted from MacScripter (http://macscripter.net/viewtopic.php?id=24737)
to timeStamp(theDate) -- theDate must be date object
set separator to "-" -- can be changed to whatever you prefer
set y to year of theDate
set m to month of theDate
set d to day of theDate
set t to time of theDate
set dateNumber to (y * 10000 + m * 100 + d)
set tempDateString to dateNumber as string
set dateString to text 1 thru 4 of tempDateString & separator & text 5 thru 6 of tempDateString & separator & text 7 thru 8 of tempDateString & separator & t
return dateString
@ROldford
ROldford / MoveArchiveToFile.applescript
Last active December 19, 2015 10:39
A TaskPaper script that can be used to move archived tasks to a timestamped file for storage. Go to http://www.hogbaysoftware.com/wiki/MoveArchiveToFile for more information.
(*
Move Archive to File script
by Ryan Oldford
handlers adapted from MacScripter (http://macscripter.net/viewtopic.php?id=24737)
This script is used with TaskPaper to move archived tasks in a document to archive
files for future reference.
The files are stored in a user-specified Archive directory within the TaskPaper directory,
and are given a timestamp in their filenames.
The script settings can be edited to match your TaskPaper folder locations and preferences
@ROldford
ROldford / UniversalDatecodeChanger.applescript
Last active December 16, 2015 10:09
A TaskPaper script that can be used to increment or decrement datecodes in any desired way (any tag, either direction, any number, any time unit of days or bigger). Go to http://www.hogbaysoftware.com/wiki/UniversalDatecodeChanger for more information.
(*
Universal Datecode Changer script
by Ryan Oldford
handlers taken from andyferra (see below for full credits)
This script is used with TaskPaper to increment or decrement datecode-type values of tags.
The script settings can be edited to allow for incrementing or decrementing
of any tag by any amount of time.
You can make multiple renamed versions of this script with different filenames
to allow for different ways of changing a datecode.
@ROldford
ROldford / TagValueEditor.applescript
Created April 18, 2013 13:30
A TaskPaper script to edit tag values. Check out http://www.hogbaysoftware.com/wiki/EditTagValues for more info.
(*
Tag Value Editor script
by Ryan Oldford
Uses handlers from MacScripter forum users (see below for full credits)
This script is used to make it easier to edit tag values in TaskPaper.
The script reads all tags for the current entry, lets the user choose
the tag they will edit, lets the user write the new tag value, then
updates the tag value.
@ROldford
ROldford / DeleteTags.applescript
Last active December 16, 2015 07:59
A TaskPaper script that makes it easier to delete tags. Check out http://www.hogbaysoftware.com/wiki/DeleteTags for more info.
(*
Delete Tags script
By Ryan Oldford
This script is used with TaskPaper to make it easier to delete tags,
since they currently can't be selected with the mouse to delete them.
The script gives a list of the tags for the currently selected entry
(i.e. whichever entry has your cursor in it). Multiple tags can be selected.
Settings:
@ROldford
ROldford / Add Task From Mail With Linkback.applescript
Created March 22, 2013 07:58
Based on AddCurrentMailToTaskPaperWithSummary found at http://www.hogbaysoftware.com/wiki/AddCurrentMailToTaskPaperWithSummary. Adds a text dialog so that the actual task can be entered instead of just using the subject line (which is still the default text).
property dialogText : "Enter task here:"
tell application "Mail"
try
set theSelection to the selection
if the length of theSelection is less than 1 then error "One or more messages must be selected."
repeat with theMessage in theSelection
my importMessage(theMessage)
end repeat
end try
@ROldford
ROldford / Parse Start and Due Dates.applescript
Last active February 26, 2024 07:03 — forked from andyferra/Parse Start and Due Dates.applescript
A script to add due and start date support to TaskPaper, forked from the script by andyferra. See http://www.hogbaysoftware.com/wiki/StartAndDueDatesV2 for more information.
(*
Parse Start and Due Dates script
By Ryan Oldford
Based on work by andyferra (https://gist.github.com/andyferra/64842)
change_case taken from http://www.macosxautomation.com/applescript/sbrt/sbrt-06.html
This script is used with TaskPaper to provide better start and due date support, as well as support for repeating tasks.
The script searches for @due and @start tags, converts their values to standard date code values,
then adds the appropriate "diff" tag whose value indicates how far away the due or start date is (negative = past, 0 = today).
Any tasks with a @repeat tag that are done are edited to remove the done tag and have their due tags updated.