This file contains hidden or 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
| --Script for setting Reminders for LaunchBar and Alfred | |
| --For Alfred, Applescript must NOT be set to run in Background otherwise date parsing does not work | |
| --For LaunchBar, place the script in ~/Library/Scripts/LaunchBar | |
| --by Michelle L. Gill, 10/07/2012 | |
| --Inspired by https://gist.github.com/3187630 | |
| --A related Alfred version 2 workflow can be found here: https://github.com/mlgill/alfred-workflow-create-reminder | |
| --Changes | |
| --02/01/2013 * Fixed an issue with setting the time when the hour is 12 and AM/PM (12-hour clock) is used | |
| -- * Removed the ability to set seconds for the time since Reminders doesn't recognize them |
This file contains hidden or 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
| # encoding=utf8 | |
| """ | |
| formd by Seth Brown, 02-24-12 | |
| modified for iOS use (Pythonista) by Brett Terpstra, 10-17-12 | |
| """ | |
| from sys import stdin, stdout | |
| import clipboard | |
| import re | |
| from collections import OrderedDict |
This file contains hidden or 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
| // bookmarklet | |
| javascript:window.location='tweetbot:///post?text=Browsing%3A%20%22' | |
| +encodeURIComponent(document.title)+'%22%20'+encodeURIComponent(encodeURI(window.location.href)); | |
| // keyconfig | |
| loadURI('tweetbot:///post?text=Browsing%3A%20%22' + encodeURIComponent(window._content.document.title)+'%22%20' + encodeURIComponent(window._content.location.href)); |
This file contains hidden or 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
| # This script downloads and opens a Gist from a URL in the clipboard. | |
| # It's meant to be put in the editor's actions menu. | |
| # | |
| # It works with "raw" and "web" gist URLs, but not with non-Python files. | |
| # | |
| # If a file already exists, a dialog is shown that asks whether the | |
| # new file should be renamed automatically. | |
| import clipboard | |
| import editor |
This file contains hidden or 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 base64 | |
| import console | |
| import editor | |
| import json | |
| import keychain | |
| import os.path | |
| import pickle | |
| import re | |
| import urllib2 |
This file contains hidden or 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
| # Here is a Bookmarklet for running the script using the current page's URL | |
| # as input: javascript:(function()%7Bif(document.location.href.indexOf('http')===0)document.location.href='pythonista://marky?action=run&argv='+document.location.href;%7D)(); | |
| import clipboard | |
| import urllib2 | |
| import webbrowser | |
| def markdownify(clipstring): | |
| marky = 'http://heckyesmarkdown.com/go/?u=' |
This file contains hidden or 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 pickle | |
| import console | |
| # I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder | |
| sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')] | |
| import dropboxlogin # this code can be found here https://gist.github.com/4034526 | |
| STATE_FILE = '.dropbox_state' |
This file contains hidden or 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
| # Example for sending an email with an attached image using smtplib | |
| # | |
| # IMPORTANT: You need to enter your email login in the main() function. | |
| # The example is prepared for GMail, but other providers | |
| # should be possible by changing the mail server. | |
| import smtplib | |
| from email.mime.base import MIMEBase | |
| from email.mime.multipart import MIMEMultipart | |
| from email import encoders |
This file contains hidden or 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 hidden or 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 webbrowser, os, pprint | |
| # Include the Dropbox SDK libraries | |
| #from dropbox import client, rest, session | |
| import dropbox | |
| # Configuration | |
| TOKEN_FILENAME = 'PythonistaDropbox.token' | |
| # Get your app key and secret from the Dropbox developer website | |
| APP_KEY = '<your dropbox app_key>' | |
| APP_SECRET = '<your dropbox app_secret>' |