Skip to content

Instantly share code, notes, and snippets.

@craigeley
craigeley / multimarkdown-chicago-fullnote
Created February 10, 2012 04:57
A modification of the Zotero Chicago Style for use with MultiMarkdown (Plain text) writing
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>Multimarkdown - Chicago (full note)</title>
<id>http://fieldnoise.com/styles/markdown-chicago-fullnote</id>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name>Julian Onions</name>
<email>julian.onions@gmail.com</email>
</author>
@craigeley
craigeley / log-completed-reminders-to-day-one.applescript
Last active May 2, 2023 17:13
An applescript that looks for Reminders completed today and then pushes them to an entry in the Day One journal app.
--Log Completed Reminders to Day One
--by Craig Eley (@craigeley), based on scripts by Samantha Hilton and Nick Morris
--This script looks for Reminders that were completed today, then automatically sends them to a single Day One entry using the Day One [CLI Tool](http://dayoneapp.com/tools/).
--Schedule it to run at 11:55 every night using Lingon or launchd and forget about it
tell application "Reminders"
set output to ""
set output to output & "# Things done on " & date string of (current date) & linefeed
@craigeley
craigeley / sb-writing.rb
Last active December 23, 2015 04:59
Scans a folder for writing files and updates an HTML file stored in Dropbox which can be read by Status Board
#!/usr/bin/env ruby
# sb-writing.rb - Monitor Daily Writing Progress with Status Board
# by Craig Eley <http://craigeley.com> | @craigeley
# Based loosely on tp-dailylog.rb by Brett Terpstra <https://gist.github.com/ttscoff/1913007>
# Finds files modified in the last day from a specific folder
# Sends modification time, title, and word count to an HTML file in a Dropbox Folder
# Add the path to your files on line 13
# Add path to Dropbox and name your HTML file on line 41
# Includes a pencil icon as an image; feel free to adjust in line 25
# Use Lingon or Hazel to set it to run at an interval or when files change
@craigeley
craigeley / Status_minders.applescript
Last active February 15, 2018 22:55
Read upcoming Apple Reminders and sort them into an HTML table for use in Panic's Status Board
tell application "Reminders"
set output to ""
set hasOne to false
repeat with i from 1 to (count of (reminders whose completed is false))
set theReminder to reminder i of (reminders whose completed is false)
set reminderName to name of theReminder
set theList to name of container of theReminder
if due date of theReminder exists then
set dueDate to due date of theReminder
@craigeley
craigeley / sifttter.rb
Last active July 23, 2018 16:37
This script looks for text files in a specific folder that include completed tasks ('@done') and timestamps, and then collects them into a daily log for the Day One journaling application. It works especially well when it's connected to IFTTT. See more details at http://craigeley.com/tagged/sifttter
#!/usr/bin/ruby
# SIFTTTER 1.5: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
# Multiple Date Function by Paul Hayes 2014 <http://paulrhayes.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 67, and the location of your Day One in line 66
# * Scans leading timestamps in each line matching the selected dates
# * Does not alter text files in any way
@craigeley
craigeley / sifttter_1.8.7.rb
Last active August 16, 2022 00:23
This script looks for text files in a specific folder modified today that include completed tasks ('@done') and timestamps, and then collects them into a daily log for the Day One journaling application. It works especially well when it's connected to IFTTT. See more details at http://craigeley.com/tagged/sifttter Use this script if you are runn…
#!/usr/bin/ruby
# Sifttter: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com>
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com>
#
# Notes:
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files changed in the last day
# * The location of your folder should be hardcoded in line 53
# * Scans leading timestamps in each line matching today's date
# * Does not alter text files in any way
# * Changes ampersand ('&') to 'and' so the script keeps running
@craigeley
craigeley / insert_location.py
Last active August 29, 2015 13:56
A Pythonista script that simply copies latitude and longitude to the clipboard
# -*- coding: utf-8 -*-
# To call script, use the follwing URL Action:
# - <pythonista://insert_location.py?action=run&argv=nav>
import location
import urllib
import webbrowser
import time
import clipboard
@craigeley
craigeley / hours_to_day_one.rb
Last active August 29, 2015 13:56
Takes a comma separated text file and imports all of the lines into individual day one entries. For more information, see:
#!/usr/bin/ruby
# Reads an hourly log file with comma separated values
# Change the path to your Day One folder on line 43
# Change the path to your text file in line 45
require 'time'
require 'erb'
require 'date'
starred = false
-- enabling the next line will delete your current entries so that the creates new ones. I would enable it, but make a backup of your files on first run to be sure.
-- do shell script "rm -rf /Users/Path/to/Files/*.taskpaper"
tell application "Reminders"
set output to ""
repeat with i from 1 to (count of (reminders whose completed is false))
set theReminder to reminder i of (reminders whose completed is false)
set reminderName to name of theReminder
set theList to name of container of theReminder
set dueDate to due date of theReminder
@craigeley
craigeley / tasks_to_logbook.rb
Last active August 29, 2015 13:57
This script finds TaskPaper items in a specific folder completed with this format: "@done(yyyy-mm-dd HH:MM)", moves and converts them into Sifttter format, and then deletes them.
#!/usr/bin/env ruby
# encoding: utf-8
require 'time'
files = Dir["/Users/USERNAME/Dropbox/Listacular/*.taskpaper"]
projects = []
found_completed = false
files.each do |file|