Skip to content

Instantly share code, notes, and snippets.

@mbreiden
mbreiden / gist:c71a02dd9d4feb6b60dd
Created August 24, 2014 10:24
Check is an image is a square and also a certain size.
-- This part is ignort in Hazel, so don't bother with it.
set theFile to choose file
hazelMatchFile(theFile)
-- The above part doesn't matter in Hazel
on hazelMatchFile(theFile)
set sizeList to {16, 19, 32, 48, 64, 96, 128}
tell application "Image Events"
@mbreiden
mbreiden / poorMansSanebox
Last active August 29, 2015 14:05
An Applescript to implement some Sanebox http://sanebox.com/t/m66z6 functionality in Mail
-- some parts taken from http://bit.ly/SaneBoxSpamSieve
-- original post on http://wp.me/p4WzrV-12
on accountAndMailboxNames()
-- Enter your account name, followed by a list of mailboxes for that account that should be filtered.
-- The account name comes from the "Description" field in the Accounts tab of Mail's preferences.
-- For example, this would filter the @SaneLater mailbox of Account 1:
-- return {{"Account 1", {"@SaneLater"}}}
-- And this would filter the @SaneLater and Other mailboxes of the Personal account
-- and the @SaneLater mailbox of the Work account: