Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# Based on everwatch.rb by Brett Terpstra, 2011, a 2013 update by spetschu, and a 2014 update by regedor
# Write in Markdown in Evernote and Backup Markdown files in Dropbox
# Change the next two lines with your account number and the path to your backup folder
watch_folder = File.expand_path("/Users/USERNAME/Library/Containers/com.evernote.Evernote/Data/Library/Application Support/com.evernote.Evernote/accounts/www.evernote.com/YOUR-ACCOUNT-NUMBER/content/")
mark_folder = "~/Dropbox/Evernotes/"
counter = 0
-- 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 / reporter_to_airtable.rb
Last active March 16, 2017 09:55
An example of moving Reporter entries to Airtable in near-real time using Reporter's JSON output and the Airtable API.
#!/usr/bin/env ruby
# Scipt Example for Moving Reporter Entries to Airtable Rows in near-real time
require 'time'
require 'json'
# To prevent encoding errors on OSX
if RUBY_VERSION =~ /2.*.*/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
@craigeley
craigeley / github_issues_to_reminders.rb
Last active April 1, 2017 20:24
If you have a server with [rem](https://github.com/kykim/rem) installed, this Ruby script can create and complete Apple Reminders when GitHub issues are opened or closed. It is currently configured to push issues from a single repo to multiple iCloud lists based on issue tags. These lists must already exist.
require 'sinatra'
require 'json'
require 'time'
require 'octokit'
require 'yaml'
set :bind, '0.0.0.0'
# Fix Encoding Errors on OSX
if RUBY_VERSION =~ /2.*.*/
@craigeley
craigeley / asana_to_things.rb
Created June 18, 2017 16:51
Sync tasks assigned to you in an Asana workspace to an area in Things 3. Define variables for lines 20 and 21 in a "data.yml" file. Fill in your area name on line 22.
#!/usr/bin/env ruby
# Syncing Tasks Assigned to you in Asana with Things 3
require 'json'
require 'yaml/store'
require 'time'
# Load storage file and variables
store = YAML::Store.new("data.yml")
mod = store.transaction { store[:mod_time] }
@craigeley
craigeley / foursquare_reporter.rb
Last active July 27, 2017 23:27
This gist checks you into your most recent Foursquare location from the Reporter iOS app, if you aren't already checked in there. To read more, see http://verifyandrepair.com/02-26-2016/using-reporter-foursquare/
#!/usr/bin/env ruby
# Use Reporter as a Foursquare Client
# Assumes your Reports contain these two questions:
# "What are you doing?" and
# "Where are you?"
require 'time'
require 'json'
require 'net/http'
@craigeley
craigeley / batch_pandoc.rb
Created June 11, 2014 15:18
Batch convert files in a folder with Pandoc
#!usr/bin/ruby
# Change the file extensions below with what you are converting from and to
extFrom = '.html'
extTo = '.md'
files = Dir.glob("*#{extFrom}")
name = ''
base = ''
files.each do |file|
@craigeley
craigeley / timeline_kml_to_geojson.rb
Created December 30, 2017 16:15
Parse a Google Timeline KML file and convert to geoJSON in order to visualize directly on GitHub.
#!/usr/local/bin/ruby
# Scipt for parsing Google Timeline files to geoJSON
require 'time'
require 'json'
require 'nokogiri'
# To prevent encoding errors on OSX
if RUBY_VERSION =~ /2.*.*/
Encoding.default_external = Encoding::UTF_8
@craigeley
craigeley / timeline_things_dayone.rb
Created December 30, 2017 19:30
Find completed Things tasks, cross reference them with Google Timeline, and send the output of each location to Day One.
#!/usr/local/bin/ruby
# Scipt for using Using Google Time to create summary records of Things in Day One
require 'time'
require 'date'
require 'json'
require 'yaml/store'
require 'nokogiri'
# To prevent encoding errors on OSX
@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