I hereby claim:
- I am hiilppp on github.
- I am hiilppp (https://keybase.io/hiilppp) on keybase.
- I have a public key whose fingerprint is 2546 C4BF 700E A88D E278 5DBD 83A5 ABB6 A181 C883
To claim this, I am signing this object:
| import notification | |
| from random import randint | |
| import sys | |
| import urllib | |
| import webbrowser | |
| reminders = ["Reminder A", ["Reminder B", "url://"], "Reminder C"] | |
| n = randint(0, len(reminders)-1) | |
| URL = "pythonista://random_reminders.py?action=run" |
| on truncate(a, n) | |
| set a_2 to paragraph 1 of a | |
| set text_item_delimiters to text item delimiters | |
| set text item delimiters to space | |
| set a_2_text_items to text items of a_2 | |
| set text item delimiters to text_item_delimiters | |
| set NO_paragraphs_in_a to count paragraphs of a | |
| if (count text items of a_2_text_items) > n then | |
| set text_item_delimiters to text item delimiters | |
| set text item delimiters to space |
| # To call script from Drafts, use the follwing URL as URL Action: | |
| # <pythonista://calculate.py?action=run&argv=[[draft]]> | |
| # Except for the last ten lines, this script was written by Erez Shinan, see <http://erezsh.wordpress.com/2013/02/24/how-to-write-a-calculator-in-70-python-lines-by-writing-a-recursive-descent-parser/>. | |
| '''A Calculator Implemented With A Top-Down, Recursive-Descent Parser''' | |
| # Author: Erez Shinan, Dec 2012 | |
| import re, collections, sys | |
| from operator import add,sub,mul,div |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="refresh" content="0; pythonista://foo.py&action=run&argv=bar"/> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <script language="JavaScript"> | |
| setTimeout("self.close()", 500); | |
| </script> | |
| </head> |
I hereby claim:
To claim this, I am signing this object:
| # To call script from Drafts, use the follwing URL as URL Action: | |
| # <pythonista://list.py?action=run&argv=[[draft]]> | |
| import os | |
| import re | |
| import sys | |
| import urllib | |
| import webbrowser | |
| a = re.sub(r"(?m)^[*-] ", "", sys.argv[1]) |
| # To call script from Drafts, use the follwing URL as URL Action: | |
| # <pythonista://sort?action=run&argv=[[draft]]> | |
| import sys | |
| import urllib | |
| import webbrowser | |
| a = sys.argv[1].split("\n") | |
| a.sort(key=str.lower) | |
| a = "\n".join(a) |
| -- 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) |
| -- Replace "[Pushover_user_key]" on line #42 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 #41 with one | |
| -- of your own. (They can be generated here: <https://pushover.net/apps/build>) | |
| on URL_encode(a) | |
| set safe_characters to "abcdefghijklmnopqrstuvwxyz0123456789~-_." | |
| set hex to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"} | |
| set a_encoded to "" |
| #!/bin/sh | |
| /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump | grep -E "^[[:space:]]*bindings:.+[a-z]+[a-z0-9.+-]*:" | sed -E "s/^[[:space:]]*bindings:[[:space:]]+//" | sort -u |