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:
# -*- coding: utf-8 -*- | |
# To call script from Drafts, use the follwing URLs as URL Actions: | |
# - <pythonista://insert_location.py?action=run&argv=[[draft]]&argv=address> | |
# (Will insert the address of your current location.) | |
# - <pythonista://insert_location.py?action=run&argv=[[draft]]&argv=link> | |
# (Will insert a Google Maps link to your current location.) | |
import location | |
import re |
# -*- coding: utf-8 -*- | |
import linguistictagger | |
import re | |
import workflow | |
def capitalize_(s): | |
if re.search(r"[A-Z]", s): | |
return s | |
else: |
-- You need to create a Keychain item whose name matches what you use in place | |
-- of "[keychain_item_name]" on line #7 (and whose password is identical to your | |
-- user account's password). | |
tell application "System Events" | |
if ((get name of every process) contains "ScreenSaverEngine") then | |
set pw to (do shell script "security find-generic-password -l \"[keychain_item_name]\" -w") | |
tell application "ScreenSaverEngine" to quit | |
delay 0.5 | |
keystroke pw |
do shell script "defaults write com.apple.screensaver askForPassword 1; defaults write com.apple.screensaver askForPasswordDelay 0" | |
repeat until (do shell script "defaults read com.apple.screensaver askForPassword") = "1" and (do shell script "defaults read com.apple.screensaver askForPasswordDelay") = "0" | |
delay 0.5 | |
end repeat | |
tell application "ScreenSaverEngine" to activate | |
if application "iTunes" is running then | |
tell application "iTunes" |
#!/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 |
-- 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 "" |
-- 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) |
# 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) |
# 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]) |
I hereby claim:
To claim this, I am signing this object: