Skip to content

Instantly share code, notes, and snippets.

@ddeville
ddeville / gist:dc6ba4346604ab4d6b65
Created July 12, 2014 21:49
Present the bookmark creation window in Spillo and populate it with the content from the frontmost tab in Safari
tell application "Safari"
set current_tab to current tab of front window
set tab_title to name of current_tab
set tab_address to URL of current_tab
tell application "Spillo"
show create bookmark panel with properties {url:tab_address, title:tab_title}
end tell
end tell
@hiilppp
hiilppp / Execute in Drafts.scpt
Last active July 7, 2019 11:45
AppleScript to be used as Automator Service that sends Drafts Actions as executable Pushover Notifications to your iOS device. The first line of the received text is expected to be the name of a Drafts Action, the rest will be used as input.
-- Replace "[Pushover_user_key]" on line #22 with your Pushover accout's user
-- key. (You can find it here: <https://pushover.net/dashboard>)
-- You should probably also replace the app token provided on line #21 with one
-- of your own. (They can be generated here: <https://pushover.net/apps/build>)
-- And, finally, replace "xxxxxx" on line #25 with your Drafts URL Key if you
-- use one. (It can be found under Drafts > Settings > URL Security.)
on URL_encode(a)
#! /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
@dahanbn
dahanbn / tag_with_pushpin.js
Created March 29, 2014 14:08
Headless bookmarklet to launch Launchcenter Pro to choose various tag sets from a list and launch Pushpin with title, URL and the chosen tags. You can add frequently used tag combinations to that bookmarklet and add later a few single tags with the excellent tag completion feature of Pushpin. It is inspired by Federio Vitticci and his headless i…
javascript:
window.location = 'launchpro://?url=' + encodeURIComponent('launchpro://?url='+ encodeURIComponent('pushpin://add?url={{' + location.href + '}}&title={{' + document.title + '}}&tags=[list:📌'+ location.href +'|without tag= |!to_check_out|ios app url-scheme=ios app url-scheme|ebook=reading ebook]'));
@viticci
viticci / Launch Center Pro action menu
Created February 4, 2014 16:18
iOS bookmarklet for Launch Center Pro
javascript:window.location='launchpro://?url='+encodeURIComponent('launchpro://?url=[list:URL: ' +location.href+'|🔵 Tweetbot=tweetbot://viticci/post?text={{'+location.href+'}}|📌 Pinswift=pinswift://x-callback-url/add?url={{'+location.href+'}}|✅ To Check Out=drafts://x-callback-url/create?text={{'+location.href+'}}&action={{Stuff To Check Out}}|🔴 Reminder=fantastical2://parse?sentence={{'+location.href+'}}&reminder=1|🔒 Open In 1Password=op'+location.href+'|🔗 Clean Link=clean-links://x-callback-url/clean?url={{'+location.href+'}}]')
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