Skip to content

Instantly share code, notes, and snippets.

View bachya's full-sized avatar

Aaron Bach bachya

View GitHub Profile
@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 / 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 / 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 / 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 / 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>
$ 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

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: