Skip to content

Instantly share code, notes, and snippets.

@oban89
oban89 / Chrome URL to Reminders
Created April 11, 2013 18:13
Bookmarklets to add he current browser page to Reminders app via Drafts for iOS.
javascript:window.location='drafts://x-callback-url/create?text='+encodeURIComponent(document.title+'\n')+encodeURIComponent(location.href)+'&action=Reminder&x-success=googlechrome://';
@billygoat
billygoat / drafts.js
Last active February 26, 2024 07:03
Drafts Bookmarklet
javascript:(function(){
var w=window,d=document,pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),pageTitle=d.title,pageUri=w.location.href,tmplt="";
tmplt="Title: "+pageTitle+"\nLink: "+pageUri+"\n\n";
if(pageSelectedTxt!="") {
pageSelectedTxt=">%20"+pageSelectedTxt;
pageSelectedTxt=pageSelectedTxt.replace(/(\r\n|\n+|\r)/gm,"\n");
pageSelectedTxt=pageSelectedTxt.replace(/\n/g,"\n>%20\n>%20");
}
w.location.href="drafts://x-callback-url/create/?text="+encodeURIComponent(tmplt+pageSelectedTxt);
})();
@ROldford
ROldford / Parse Start and Due Dates.applescript
Last active February 26, 2024 07:03 — forked from theconektd/Parse Start and Due Dates.applescript
A script to add due and start date support to TaskPaper, forked from the script by andyferra. See http://www.hogbaysoftware.com/wiki/StartAndDueDatesV2 for more information.
(*
Parse Start and Due Dates script
By Ryan Oldford
Based on work by andyferra (https://gist.github.com/andyferra/64842)
change_case taken from http://www.macosxautomation.com/applescript/sbrt/sbrt-06.html
This script is used with TaskPaper to provide better start and due date support, as well as support for repeating tasks.
The script searches for @due and @start tags, converts their values to standard date code values,
then adds the appropriate "diff" tag whose value indicates how far away the due or start date is (negative = past, 0 = today).
Any tasks with a @repeat tag that are done are edited to remove the done tag and have their due tags updated.
@sebietter
sebietter / Upload_Picture.py
Created February 11, 2013 14:07
With this script for Pythonista you can easily upload a picture from iOS to your own webserver.
import webbrowser
import clipboard
import Image, ImageFile
import datetime
import ftplib
import urllib
from io import BytesIO
today = datetime.datetime.now()
image = clipboard.get_image()
@tofias
tofias / Search Pinboard from Drafts
Created February 7, 2013 21:57
Search Pinboard from Drafts
drafts://x-callback-url/import_action?type=URL&name=Search%20in%20Pinboard&url=https%3A%2F%2Fm.pinboard.in%2Fsearch%2F%3Fquery%3D%5B%5Bdraft%5D%5D%26mine%3DSearch%2BMine
@ChewingPencils
ChewingPencils / taskpaper_drafts_action.txt
Created February 7, 2013 14:46
Drafts action to append an indented task with an indented note
drafts://x-callback-url/import_action?type=dropbox&name=TaskPaper%20with%20Indented%20Note&path=%2FTaskPaper%2F&filenametype=2&filename=filename&ext=txt&writetype=0&template=%09-%20%5B%5Btitle%5D%5D%0A%09%09%5B%5Bbody%5D%5D
@wrenoud
wrenoud / DropboxSync.py
Created November 10, 2012 02:46
DropboxSync
import os
import sys
import pickle
import console
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
import dropboxlogin # this code can be found here https://gist.github.com/4034526
STATE_FILE = '.dropbox_state'
@omz
omz / Top Apps.py
Created November 7, 2012 20:54
Top Apps
# Shows a list of the 10 top paid apps on the App Store.
print 'Loading...'
import feedparser
import console
print 'Fetching Feed...'
feed = feedparser.parse('http://itunes.apple.com/us/rss/toppaidapplications/limit=10/xml')
entries = feed['entries']
<form action="<?php echo url('search') ?>" method="get">
<!-- html for your global search form -->
</form>
@simonscheiber
simonscheiber / sitemap.php
Created August 15, 2012 22:07
Kirby sitemap generator excluding invisible folders
<?php
$ignore = array('sitemap', 'error');
// send the right header
header('Content-type: text/xml; charset="utf-8"');
// echo the doctype
echo '<?xml version="1.0" encoding="utf-8"?>';