This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Evernote" | |
set Evernote_Selection to selection | |
if Evernote_Selection is {} then display dialog "Please select a note." | |
set noteLink to "" | |
repeat with i from 1 to the count of Evernote_Selection | |
set noteHTML to HTML content of item i of Evernote_Selection | |
end repeat | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:window.location='drafts://x-callback-url/create?text='+encodeURIComponent(document.title+'\n\n')+'%5B'+encodeURIComponent(document.title)+'%5D('+encodeURIComponent(location.href)+')'+encodeURIComponent('\n\n>'+window.getSelection())+'&action=postachio&x-success='+encodeURIComponent(location.href); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set {black, blue, brown, cyan, green, magenta, orange, purple, red, yellow, white} to {{0, 0, 0}, {0, 0, 65535}, {39321, 26214, 13107}, {0, 65535, 65535}, {0, 65535, 0}, {65535, 0, 65535}, {65535, 32768, 0}, {32768, 0, 32768}, {65535, 0, 0}, {65535, 65535, 0}, {65535, 65535, 65535}} | |
set {cantaloupe, honeydew, spindrift, sky, lavender, carnation, licorice, snow, salmon, banana, flora, ice, orchid, bubblegum, lead, mercury, tangerine, lime, sea_foam, aqua, grape, strawberry, tungsten, silver, maraschino, lemon, spring, turquoise, blueberry, iron, magnesium, mocha, fern} to {{65535, 52428, 26214}, {52428, 65535, 26214}, {26214, 65535, 52428}, {26214, 52428, 65535}, {52428, 26214, 65535}, {65535, 28527, 53199}, {0, 0, 0}, {65535, 65535, 65535}, {65535, 26214, 26214}, {65535, 65535, 26214}, {26214, 65535, 26214}, {26214, 65535, 65535}, {26214, 26214, 65535}, {65535, 26214, 65535}, {6425, 6425, 6425}, {59110, 59110, 59110}, {65535, 32896, 0}, {32896, 65535, 0}, {0, 65535, 32896}, {0, 32896, 65535}, {32896, 0, 6553 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Banner-style (default) | |
from Foundation import NSUserNotification, NSUserNotificationCenter | |
def notify(title, subtitle, text): | |
notification = NSUserNotification.alloc().init() | |
notification.setTitle_(str(title)) | |
notification.setSubtitle_(str(subtitle)) | |
notification.setInformativeText_(str(text)) | |
notification.setSoundName_("NSUserNotificationDefaultSoundName") | |
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# encoding: utf-8 | |
from __future__ import unicode_literals | |
import re | |
import json | |
#import sqlite3 | |
import os.path | |
import subprocess | |
from collections import OrderedDict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# encoding: utf-8 | |
import os | |
import plistlib | |
def check_for_workflow(name): | |
"""Check if specified workflow name exists""" | |
workflows_dir = os.path.dirname(os.getcwd()) | |
all_wfs = os.walk(workflows_dir).next()[1] | |
found = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import urllib2 | |
from zipfile import ZipFile | |
from StringIO import StringIO | |
LIB_PATH = os.path.expanduser("~/Library/Application Support/Alfred 2/" \ | |
"Workflow Data/alfred.bundler-aries/assets/python/") | |
def _install_pip(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# encoding: utf-8 | |
from __future__ import unicode_literals | |
import os | |
import imp | |
import sys | |
import json | |
import shutil | |
import base64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import urllib2 | |
import plistlib | |
import xmltodict | |
import subprocess | |
def as_run(ascript): | |
"""Run the given AppleScript and return the standard output and error.""" |
OlderNewer