Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<!-- N.B. 'system-font' is also available as an alias; it will be mapped to the actual system font at runtime. -->
poritsky / name-to-comments.applescript
Created September 2, 2015 16:46
Copy selected file name without extension to comments.
tell application "Finder"
set theFile to selection as alias
tell application "System Events" to tell disk item (theFile as text) to set {theName, theExtension} to {name, name extension}
if theExtension is not "" then set theName to text 1 thru -((count theExtension) + 2) of theName -- the name part
set comment of theFile to theName
end tell
poritsky / reader.css
Last active August 29, 2015 14:21
Modifications to Marius Hauken’s Fever Theme. Uses San Francisco font for everything but article body text. For more info on installation, see original project:
html{min-height:100%;margin-bottom:1px}body{background:#fff;padding:0;color:#333;font-family:Helvetica, Arial, sans-serif;min-height:100%;margin:0}a{text-decoration:none;color:#c1382b;cursor:pointer}a:hover{color:#6e2018;text-decoration:underline}code,pre{background-color:#E8E8E8;opacity:0.75;font:10px/14px Monaco, monospace}pre{padding:8px;overflow:auto}img,object{max-width:100%;height:auto}form{padding:0 0 3px}form table{width:100%}th.proto{white-space:nowrap}td.proto{width:100%}form tr>*{padding:8px 10px 5px 0;background:url(images/bg-form-divider.png) 50% 0 no-repeat}fieldset table:first-child tr:first-child>*{background-image:none}form tr>*:first-child{padding-left:15px;background-position:0 0}form tr>*:last-child{padding-right:15px;background-position:100% 0}.dialog form tr>*:first-child{padding-left:5px}.dialog form tr>*:last-child{padding-right:5px}#service-template{display:none}table.embedded th{padding:4px 0 0}table.embedded th strong{display:block;position:relative;top:2px;left:0;background:url(ima
poritsky / Delete Completed Reminders.applescript
Created April 27, 2015 18:47
Delete Completed Reminders in
tell application "Reminders"
delete (every reminder whose completed is true)
end tell
poritsky / Templates.scpt
Created March 6, 2015 16:43
Small modification to an old version of Chris Suave's Templates.scpt
Modified by Jonathan Poritsky in the smallest way:
March 6, 2015: Switched from Growl to OS X Notifications
Created and since updated by Chris Suave. Full Details at:
For whatever reason the lasest version isn't working as well as this two year old version (save for the growl to notifications change I made).
poritsky / Pinboard Mod 2015.css
Created January 26, 2015 19:56
Just a modification for, inspired by Brett Terpstra. Works best on OS X.
@font-face{font-family:'FontAwesome';src:url('');src:url('') format('embedded-opentype'),url('') format('woff'),url('') format('truetype'),url('') format('svg');font-weight:normal;font-style:normal}
#pinboard{width:100%;padding:0 !important;margin:0 !important;background-color:#f9f9f9 !important;}
#banner{background:rgb(15,128,255) !important;width:100% !important;min-width:1100px;position:fixed;left:0;padding:15px 0 16px 0 !important;z-index:10;font-family:"Avenir Next Condensed";}
poritsky / mail-rules-to-sieve.applescript
Last active December 8, 2023 22:04
Apple Mail Rules to FastMail Advanced Sieve Rules
Apple Mail Rules to FastMail Advanced Sieve Rules
Jonathan Poritsky,
November 8, 2013
For more information on FastMail server rules (and requisite warnings) read Gabe Weatherhead's piece on transitioning to server-side mail rules:
poritsky / automate-mt-tagging.applescript
Last active October 27, 2018 07:08
A work-in-progress script to add MailTags keywords to messages in Mail based on sender. Uses GUI scripting and you'll have to jump through some hoops to add this to a workflow, but it may be of use. Toughest part is adding new addresses to it. Also note: the tags in the script must "Preferred Keywords" to be in your menubar.
# Automate MailTags Tagging
# by Jonathan Poritsky
# Instructions for editing inline.
tell application "Mail"
set m to (selection)
set s to (extract address from sender of item 1 of m)
poritsky / list-of-addresses-in-rule.applescript
Last active December 15, 2015 09:19
Gathers list of expressions in Apple Mail rules, which in my use simply gathers a list of email addresses, then formats them into a procmail rule.
set l to {}
set r to "Archive" --Apple Mail Rule from which to pull addresses
set f to "Archive" --Name of folder to move messages from sender to
tell application "Mail"
set m to properties of rule conditions of rule r
repeat with v in m
set p to the expression of v
set l to l & ".*" & p & "|" as list
end repeat
poritsky / gist:5210778
Created March 21, 2013 04:53
Open Mail Preferences and select the "Rules" pane. Because using a mouse is so 2012.
tell application "System Events"
tell process "Mail"
tell menu bar 1
tell menu "Mail"
click menu item "Preferences…"
end tell
end tell
end tell
end tell
tell application "System Events"