This is a short set of functions that use the httr package to upload a directory of files as a gist. The post_gist function uploads an anonymous gist, which can only be deleted within a short time of being uploaded. So be cautious in what you upload using this function.
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
| # Note that this script attempts to delete directories (Folders) called 'temp' and 'dateutil' | |
| # within Pythonista as part of installation. It will also overwrite files in directories | |
| # named 'github' and 'githubista'. If you are using Pythonista 1.3 or above please check | |
| # that you have not created any Folders with these names before running this script as | |
| # any files inside them will be irretrievably lost. | |
| import os | |
| import urllib2 | |
| import tarfile | |
| import shutil | |
| import traceback |
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, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip | |
| # Credits | |
| # | |
| # The python code here was written by pudquick@github | |
| # | |
| # License | |
| # | |
| # This code is released under a standard MIT license. | |
| # |
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
| the | |
| of | |
| to | |
| and | |
| a | |
| in | |
| is | |
| it | |
| you | |
| that |
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 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 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
| tell application "Finder" | |
| set sel to the selection as text | |
| set fPath to quoted form of POSIX path of sel | |
| do shell script ("cat " & fPath & " | pbcopy && pbpaste") | |
| end tell |
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
| <en-media width="640" height="480" type="image/jpeg" hash="f03c1c2d96bc67eda02968c8b5af9008"/> |
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
| -- AppleScript -- | |
| -- This example is meant as a simple starting point to show how to get the information in the simplest available way. | |
| -- Keep in mind that when asking for a `return` after another, only the first one will be output. | |
| -- This method is as good as its JXA counterpart. | |
| -- Webkit variants include "Safari", "Webkit", "Orion". | |
| -- Specific editions are valid, including "Safari Technology Preview". | |
| -- "Safari" Example: | |
| tell application "Safari" to return name of front document |
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
| <a href="tel:1-408-555-5555">1-408-555-5555</a> | |
| <a href="sms:1-408-555-1212">New SMS Message</a> |
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
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| ## iMDtoPDF.py | |
| ## by W. Caleb McDaniel | |
| ## http://wcm1.web.rice.edu | |
| ## This is a wrapper script for sending documents to Docverter | |
| ## for conversion from markdown to PDF using Pandoc. Typically | |
| ## Docverter calls are made with cURL; this script uses httplib. |