Skip to content

Instantly share code, notes, and snippets.

@ROldford
ROldford / Parse Start and Due Dates.applescript
Last active February 26, 2024 07:03 — forked from andyferra/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.
@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);
})();
@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://';
@omz
omz / ShortURL.py
Created May 17, 2013 04:17
ShortURL
# Simple URL shortener using is.gd
#
# Save this script as 'ShortURL' in Pythonista and add the
# bookmarklet below to Safari. The result is copied to the clipboard.
# Bookmarklet:
# javascript:window.location.href='pythonista://ShortURL?action=run&argv='+encodeURIComponent(window.location.href);
import clipboard
import re
@harryjubb
harryjubb / Find and Replace.py
Created June 1, 2013 18:58
Find and Replace in Pythonista for iPad
'''
Pythonista Find and Replace
===========================
Notices
-------
Copyright 2013 Harry Jubb.
This program is free software: you can redistribute it and/or modify
@sgerin
sgerin / ios_icons
Created August 19, 2013 03:18
Get iOS icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script: http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Gets the 1024px version of an app icon and applies a rounded mask. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# You may find odd result: try searching for both device categories.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
@sgerin
sgerin / gist:6265532
Created August 19, 2013 03:25
Get OS X icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script : http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Fetches the 1024px version of an OS X app icon. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
def find_icon(terms):
@drdrang
drdrang / Cleanbar.py
Last active July 6, 2017 20:28
Clean up the statusbar of an iOS screenshot. The time in the statusbar is maintained, but all other graphics are stripped out and replaced with graphics that show full battery and signal strength. The cellular provider is replaced with the Apple logo, . All graphics are built into the script, which works for any Retina iOS device in any orienta…
#!/usr/bin/python
import Image
import base64, zlib
# Jay Parlar convinced me to turn this data structure
# from a dictionary into an object.
class PackedImage(object):
def __init__(self, mode, size, data):
self.mode = mode
@Cuboctaedro
Cuboctaedro / extend.php
Created November 20, 2013 13:32
An extension of Kirbytext for creating a custom "figure" tag for images with complex captions.
<?php
class kirbytextExtended extends kirbytext {
function __construct($text, $markdown=true) {
parent::__construct($text, $markdown);
$this->addTags('figure');
@bomberstudios
bomberstudios / sketch-plugins.md
Last active February 26, 2024 07:02
A list of Sketch plugins hosted at GitHub, in no particular order.