Skip to content

Instantly share code, notes, and snippets.

<outline text="Google" _note="http://google.com"/>
<outline text="Google" type="link" url="http://google.com"/>
@jkishner
jkishner / DraftstoSpotify.py
Last active August 29, 2015 14:03 — forked from brettkelly/BufferClipboardUrl.py
Instead of sending "{title} :: {url}" to bufferapp, this fork sends {title}={url}" to Drafts for iOS, and then triggers a Dropbox action. If you don't want the action, just remove "action=spotify&" from the line starting with "out ="
#!/usr/bin/env python
# Minor modifications by Jeffrey Kishner to send title and URL to Drafts instead of Buffer
# @kishner
# http://blog.jeffreykishner.com
# Coded poorly by Brett Kelly
# http://nerdgap.com
# @inkedmn
# Source: http://gimi.name/snippets/uploads/urlencode.sed
s/%/%25/g
s/ /%20/g
s/ /%09/g
s/!/%21/g
s/"/%22/g
s/#/%23/g
s/\$/%24/g
s/\&/%26/g
s/'\''/%27/g
#! /bin/bash
encodedmessage=$(echo "$message" | sed -f urlencode.sed)
encodedaction=$(echo "$action" | sed -f urlencode.sed)
curl -s \
-F "token=$APP_TOKEN" \
-F "user=$USER_KEY" \
-F "message=drafts:///create?text=$encodedmessage&action=$encodedaction" \
https://api.pushover.net/1/messages.json
file.readWholeFile ("myVerbs.js", $.globalEval);
$("body").keydown(function(e) { var commandKey = e.metaKey || e.ctrlKey; switch(e.which) { case 69: if(commandKey) { jeffVerbs.viewFeed (); } break; } });
var jeffVerbs = {
viewFeed: function() {
$.getScript("DOMAIN.COM/rssReader.js", function() {
var rss = new RssReader;
rss.main();
});
}
}
View in New Window
var link = op.attributes.getOne("url");
window.open(link);
View in Instapaper
var link = op.attributes.getOne("url");
window.open("https://www.instapaper.com/text?u="+link);
Add to Instapaper
var link = op.attributes.getOne("url");
window.open("http://www.instapaper.com/edit?url=" + link);
Add Feed
dialog.ask ("Paste the URL", "", "", function (name) {
op.attributes.setOne ("xmlUrl", name);
});