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 re | |
g = re.search ('\[[^\]]*\]\(.*"([^"]*)"\)','[foo](bar.com "Title")') | |
print (g.group(1)) |
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
This gist contains a workflow for Editorial, an app for | |
writing plain text and markdown on iOS. | |
To import the workflow, copy the *entire* text of the gist, | |
then open Editorial and create a new workflow. | |
------------ BEGIN WORKFLOW ------------ | |
{ | |
"actions" : [ | |
{ |
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
# -*- coding: utf-8 -*- | |
import requests, json, webbrowser, urllib, sys | |
API_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' # Get your api key from https://code.google.com/apis/console/, you MUST add the Places API permission to it | |
GOOGLE_PLACES_URI = 'https://maps.googleapis.com/maps/api/place/textsearch/json?query={0}&sensor=false&key={1}' | |
APPLE_MAPS_URI = 'safari-http://maps.apple.com/?q={0}' | |
#call this script in pythonista for ios pythonista://GoogleToAppleMaps?action=run&argv=[prompt] | |
def main(): |
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 requests | |
CLIENT_KEY="" | |
EMAIL="" | |
PASSWORD="" | |
AUTHORIZE_ENDPOINT="http://feedwrangler.net/api/v2/users/authorize?email=%s&password=%s&client_key=%s" % (EMAIL, PASSWORD, CLIENT_KEY) | |
authorize = requests.get(AUTHORIZE_ENDPOINT) | |
access_token = authorize.json()['access_token'] |
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/env python3 | |
from os.path import expanduser | |
from urllib import request | |
from urllib import parse | |
import json | |
import sys | |
API_URL = "https://feedwrangler.net/api/v2/" |
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 | |
import Image | |
import base64, zlib | |
# Jay Parlar convinced me to turn this data structure | |
# from a dictionary into an object. | |
class PackedImage(object): | |
def __init__(self, mode, size, data): | |
self.mode = mode |
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
# IMPORTANT SETUP INSTRUCTIONS: | |
# | |
# 1. Go to http://www.dropbox.com/developers/apps (log in if necessary) | |
# 2. Select "Create App" | |
# 3. Select the following settings: | |
# * "Dropbox API app" | |
# * "Files and datastores" | |
# * "(No) My app needs access to files already on Dropbox" | |
# * "All file types" | |
# * (Choose any app name) |
OlderNewer