Skip to content

Instantly share code, notes, and snippets.

@joebuhlig
joebuhlig / Parse Inbox.scpt
Created April 22, 2015 12:23
An Omnifocus script for parsing the Inbox every 2 minutes.
on idle
tell application "OmniFocus"
tell front document
set theInbox to every inbox task
if theInbox is not equal to {} then
repeat with n from 1 to length of theInbox
set currentTask to item n of theInbox
set taskName to name of currentTask
if taskName starts with "--" then
set taskName to ((characters 3 thru -1 of taskName) as string)
@joebuhlig
joebuhlig / Omnifocus Hotspot.scpt
Created April 22, 2015 12:27
Use this script in Hazel to create a hotspot that makes tasks out of files in Omnifocus.
tell application "Finder" to set file_name to (name of theFile)
set theDate to current date
set theNote to "Imported on:" & (theDate as string) & "
"
set projectname to "Test Project"
set theTask to "Review File: " & file_name
tell application "OmniFocus"
PATH=$PATH:/usr/local/bin:/usr/local/sbin
#!/bin/bash
gitbranch=`git rev-parse --abbrev-ref HEAD`
if [ $gitbranch = "master" ]; then
date=`date +%m/%d/%Y`
datetime=`date +%r`
gitwa=`git diff HEAD^ HEAD --word-diff=porcelain | grep -e "^+[^+]" | wc -w`
gitwd=`git diff HEAD^ HEAD --word-diff=porcelain | grep -e "^-[^-]" | wc -w`
commit=`git log -1 --pretty=%B`
cnt=`expr $gitwa - $gitwd`
<plist version="1.0">
<dict>
<key>Blog</key>
<string>14BL26</string>
<key>Church</key>
<string>14CH00</string>
<key>Father</key>
<string>14FA01</string>
<key>Friend</key>
<string>14FR00</string>
set thePList to "Users:JoeBuhlig:Dropbox:pList:Project_Codes.plist"
set thePListPath to POSIX path of thePList
tell application "System Events"
tell property list file thePListPath
tell contents
set pcode to value of property list item "HouseCar"
set yr to text -2 thru -1 of ("00" & (year of (current date))) as number
set y to text -6 thru -5 of pcode as number
set inc to text -2 thru -1 of pcode as number
if (yr > y) then
@joebuhlig
joebuhlig / DailyReport.applescript
Created March 24, 2016 15:29
Script for Hazel to create a text file task report from OmniFocus
on hazelProcessFile(theFile)
set filePath to "/Users/JoeBuhlig/Dropbox/Text/TaskReports/" -- Where to save the resulting text file (Be sure to add the trailing "/")
-- Create the new filename as YYYYMMDD.txt
set todayDate to current date
set yestDate to todayDate - 1 * days
set {year:y, month:m, day:d} to yestDate
set fileName to y * 10000
set fileName to fileName + (m * 100)
set fileName to fileName + d
function weatherLogger() {
var url = "http://api.wunderground.com/api/XXXXXXXXXXX/yesterday/q/STATE/CITY.json"
var response = UrlFetchApp.fetch(url);
var data = JSON.parse(response);
var summary = data.history.dailysummary[0];
var slength = summary.length;
var newFileData = summary["date"]["pretty"] + "\n";
newFileData += "\n";
newFileData += "High temp: " + summary["maxtempi"];
newFileData += "\n";
function weatherLogger() {
var url = "http://api.wunderground.com/api/XXXXXXXXXXX/forecast/q/STATE/CITY.json"
var response = UrlFetchApp.fetch(url);
var weather = JSON.parse(response);
var summary = weather.forecast.simpleforecast.forecastday[0];
var newFileData = summary["date"]["pretty"] + "\n";
newFileData += "\n";
newFileData += "High temp: " + summary["high"]["fahrenheit"] + "°F/" + summary["high"]["celsius"] + "°C";
newFileData += "\n";
newFileData += "Low temp: " + summary["low"]["fahrenheit"] + "°F/" + summary["low"]["celsius"] + "°C";
require 'formula'
class Imagemagick < Formula
homepage 'http://www.imagemagick.org'
url 'http://www.imagemagick.org/download/releases/ImageMagick-6.9.8-10.tar.xz'
sha256 '2bfc0dbddcac1cf08eaab76df1bd32131e97d50544ac5a6d662f1d885e2b6814'
head 'https://www.imagemagick.org/subversion/ImageMagick/trunk',
:using => UnsafeSubversionDownloadStrategy

Keybase proof

I hereby claim:

  • I am joebuhlig on github.
  • I am joebuhlig (https://keybase.io/joebuhlig) on keybase.
  • I have a public key ASC-tyBe6czvWn8J6Bz18TEnGJ8eYqFrcNsoIl57dVtM2Ao

To claim this, I am signing this object: