Skip to content

Instantly share code, notes, and snippets.

View bachya's full-sized avatar

Aaron Bach bachya

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bachya on github.
  • I am bachya (https://keybase.io/bachya) on keybase.
  • I have a public key whose fingerprint is D120 C2D0 5B5C 4B18 18DB C820 BFDB F9AD 73A7 CCF1

To claim this, I am signing this object:

$ cd bachya/PinPress
travis_fold:start:git.3
$ git checkout -qf 12ceafd49e63013fba880886895519ff1b401ced
travis_fold:end:git.3
$ rvm use 2.1.0 --install --binary --fuzzy
Using /home/travis/.rvm/gems/ruby-2.1.0
$ export BUNDLE_GEMFILE=$PWD/Gemfile
$ ruby --version
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
$ rvm --version
@bachya
bachya / Bitlyize
Last active August 29, 2015 14:00
#!/usr/bin/ruby
# encoding: utf-8
require 'net/http'
require 'net/https'
require 'uri'
require 'cgi'
### Config
# find your bit.ly key at <https://bitly.com/a/settings/advanced>
@bachya
bachya / List.txt
Created May 6, 2014 04:47
Some good RESTful web service implementations
Great guide: http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api
APIs:
https://www.flickr.com/services/api/
https://trello.com/docs/api/index.html
http://www.goodreads.com/api
@bachya
bachya / fenced event challenge.md
Created July 22, 2014 17:19
Fenced Event Challenge

The Scenario

I often need to schedule events and travel time to/from those events (so that others don't book meetings when I'm traveling). Creating those "fenced" events is tedious and doesn't satisfy my need for an elegant solution.

The Desired Outcome

I would like a Launch Center Pro action that:

  1. prompts me to enter an event/date/time combo
  2. prompts me to enter an amount of time (in minutes) for the "beginning fence"
@bachya
bachya / gist:694ff8a774f805882218
Created July 23, 2014 16:34
Updated Markdown Links in TextExpander
tell application "System Events"
set numSafari to count (every process whose name is "Safari")
set numChrome to count (every process whose name is "Google Chrome")
end tell
if numSafari > 0 then
tell application "Safari"
set fURL to URL of front document
set fTitle to name of front document
end tell
@bachya
bachya / Clipboard URL to OmniFocus.py
Last active August 29, 2015 14:05
A Pythonista script to take a URL (passed in via argv[1]), parse its title, and create an OmniFocus task from it.
# Script to scrape an HTML page's title and, along with its URL, send it to OmniFocus as a task.
# Author: Aaron Bach
# www: http://www.bachyaproductions.com/
import clipboard
import re
import sys
import urllib
import urllib2
import webbrowser
@bachya
bachya / Email to OmniFocus (Drafts)
Created August 24, 2014 20:15
A Drafts email action to send a draft to OmniFocus via Mail Drop
drafts://x-callback-url/import_action?type=email&name=Email to OmniFocus&to=xxxxx.xxxxx@sync.omnigroup.com&cc=&bcc=&subjecttype=1&subject=&markdown=1&background=1&fromprefix=&template=[[body]]
@bachya
bachya / Update Grocery Stores.py
Last active October 28, 2016 18:24
Pythonista script to create a Launch Center Pro action related to Trello lists
# Pythonista script to create a Launch Center Pro action with all my
# updated grocery lists.
# Author: Aaron Bach
# www: http://www.bachyaproductions.com/
import json
import os
import sys
import urllib
import urllib2
@bachya
bachya / LCP Action Router.py
Last active August 29, 2015 14:06
Pythonista script to trigger different Launch Center Pro actions based on internet availability
# Pythonista script to trigger different Launch Center Pro
# actions based on internet availability
# Author: Aaron Bach
# www: http://www.bachyaproductions.com/
import json
import re
import socket
import sys
import urllib