Skip to content

Instantly share code, notes, and snippets.

@jkishner
jkishner / remind me
Created November 8, 2013 20:59
Add this script to your menubar.opml outline in Fargo.io. To use, type your reminder in a headline in Fargo. Leave cursor on that headline, choose the script "Remind me." Enter the time in military time (e.g. 15:20 is 3:20pm). This script only works for a reminder on the same day, and only one reminder at a time. It will also only work in one se…
remind me
dialog.ask("When do you want to be reminded?","","use military time e.g. 15:20", function (time) {
reminder = op.getLineText();
dialog.alert("You have asked to be reminded to " + reminder + " at " + time + " today");
var myVar=setInterval(function(){myTimer()},60000);
function myTimer() {
var now = clock.now().toString();
var date = clock.now().toDateString();
var due = date + " " + time + ":00 GMT-0500 (EST)";
if (now > due) { dialog.alert (reminder); clearInterval(myVar); }
# 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
javascript:(function%20pushoverBookmarklet()%20%7B%20%20%20%20%20%20%20%20%20%20%20%20function%20pushoverNotification(token,%20user,%20title,%20message,%20url)%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20params%20%3D%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20token:%20token%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20user:%20user%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20title:%20title%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20message:%20message%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20url:%20url%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20data%20%3D%20%221%3D1%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20for%20(var%20key%20in%20params)%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data%20%2B%3D%20%22%26%22%20%2B%20key%20%2B%20%22%3D%22%20%2B%20params%5Bkey%5D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%2
javascript:window.location='drafts://x-callback-url/create?text=text%3D%22'+encodeURIComponent(document.title)+'%22%20url%3D%22'+encodeURIComponent(location.href)+'%22&action=opml'
javascript:window.location='drafts://x-callback-url/create?text=%5B'+encodeURIComponent(document.title)+'%5D('+encodeURIComponent(location.href)+')&action=Copy%20to%20Clipboard'
javascript:alert('<opml><body><outline text="'+document.title+'" _note="'+location.href+'"/></body></opml>');
@jkishner
jkishner / instagramImage.py
Last active August 3, 2016 04:59
instagramImage.py
import requests
import json
import sys
import urllib
import webbrowser
url = sys.argv[1]
data = requests.request('GET','http://api.instagram.com/publicapi/oembed/?url=' + url)
if data.status_code == 200:
embed = json.loads(data.text)
img = embed['thumbnail_url']
<?xml version="1.0" encoding="utf-8"?>
<opml version="1.0">
<head>
<title>OmniTest</title>
<expansionState>0</expansionState>
</head>
<body>
<outline text="Google" url="http://google.com" type="link"/>
<outline text="It is a &lt;a href=http://google.com&quot;&gt;link&lt;/a&gt;"/>
</body>
@jkishner
jkishner / opml bookmarklet
Created January 24, 2014 18:59
opml bookmarklet
javascript:alert('<opml><body><outline text="&lt;a href='+location.href+'&gt;'+document.title+'&lt;/a&gt;"><outline text="'+window.getSelection()+'" icon="quote-left"/></outline></body></opml>');