Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'trello'
include Trello
subject = ARGV[0]
id = ARGV[1]
message = ARGV[2]
# There's a little setup involved here.
@pdxmph
pdxmph / mail_to_trello.applescript
Created January 11, 2015 07:34
Send a message to Trello
on log_err(message)
display notification message
log message
end log_err
on run
try
tell application "Mail"
set theAddress to "[email protected]"
set messageURL to ""
@pdxmph
pdxmph / org-custom-faces.el
Last active August 29, 2015 14:12
Some Custom
;; These faces go pretty well with the flatui theme from
;; https://github.com/Corsair/emacs-flatui-theme
'(org-agenda-date ((t (:inherit org-agenda-structure :weight semi-bold :height 1.2))) t)
'(org-date ((t (:foreground "Purple" :underline t :height 0.8 :family "Helvetica Neue"))))
'(org-done ((t (:foreground "gray57" :weight light))))
'(org-level-1 ((t (:weight semi-bold :height 1.1 :family "Helvetica Neue"))))
'(org-level-2 ((t (:inherit outline-2 :weight semi-bold :height 1.1))))
'(org-level-3 ((t (:inherit outline-3 :weight bold :family "Helvetica Neue"))))
'(org-level-5 ((t (:inherit outline-5 :family "Helvetica Neue"))))
@pdxmph
pdxmph / mutt_macros.md
Created December 23, 2014 23:56
Some handy mutt macros for this and that

Implement Lightweight Profiles to switch between email personae

Setup: Make personal.profile and work.profile files and use them to configure the things that are unique to each identity, e.g.

	# -*- muttrc -*-                                                                                                                                         
	# Mutt sender profile : personal/default                                                                                                                 

	# get us out of whatever default folder we're in																																																																								 
	unset folder
@pdxmph
pdxmph / Things2Org.applescript
Created November 16, 2014 22:46
Convert all your Things projects to org mode projects and todos. Understands tags (converts to org-mode-style colon-delimited lists), due dates (converts to deadlines), status (converts "open" to "todo", "completed" to "DONE" and "canceled" to "CANCELED")
tell application "Things"
set myOrgOutput to ""
repeat with theProject in projects
set myName to the name of theProject & return
set myTasks to the to dos of theProject
set myOrgOutput to myOrgOutput & return & return & "* " & myName
repeat with myTodo in myTasks
@pdxmph
pdxmph / sprint_animals.rb
Last active August 29, 2015 14:07
Sprint Animal Namerator
#!/usr/bin/ruby
require 'sentimental'
require 'sinatra'
require 'searchbing'
#sprint_letter = ARGV[0]
Sentimental.load_defaults
Sentimental.threshold = 0.5
analyzer = Sentimental.new
activate application "Password Generator"
tell application "System Events"
tell process "Password Generator"
set value of text field 1 of tab group 1 of window "Password Generator" to "7"
select checkbox "A-Z" of tab group 1 of window "Password Generator"
select checkbox "0-9" of tab group 1 of window "Password Generator"
select checkbox "a-z" of tab group 1 of window "Password Generator"
click button "Generate" of window "Password Generator"
click button "Copy" of window "Password Generator"
click button 1 of window "Password Generator"
@pdxmph
pdxmph / Net Radio to Things.rb
Created October 14, 2013 02:29
Get the current 'net radio track info from iTunes, make it a todo in Things
#!/usr/bin/env ruby
require "rubygems"
require "appscript"
include Appscript
itunes = app("iTunes")
things = app("Things")
list = "Things to Look Up"
project = things.projects[list]
@pdxmph
pdxmph / Current Net Radio from iTunes to Evernote.applescript
Created October 14, 2013 02:28
Grabs the current track info from the playing Internet stream on iTunes and makes an Evernote note out of it, tagged "music"
tell application "iTunes"
set myURL to the current stream URL
set myStream to the current stream title
set myLabel to myStream & " -- " & myURL
tell application "Evernote"
set myNewNote to create note title myLabel with text "" tags {"music"}
set the source URL of myNewNote to myURL
end tell
end tell
@pdxmph
pdxmph / Set Evernote Reminder.applescript
Created October 12, 2013 19:10
Gets selected Evernote note(s) and adds a reminder date to them (effectively turning them into todos)
set myRemind to (current date) + 1 * days
tell application "Evernote"
set myNotes to selection
repeat with theNote in myNotes
set the reminder time of theNote to myRemind
end repeat