Skip to content

Instantly share code, notes, and snippets.

@hiilppp
hiilppp / DrafTerm.scpt
Last active October 15, 2019 12:13
As a text file is added to a directory to which this AppleScript is associated as Folder Action, the content of the received file is executed as shell script and the generated output sent to an iOS device.
-- 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 ""
@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)
@hiilppp
hiilppp / title_case.py
Created August 16, 2014 12:11
Python script for capitalizing titles (according to The Chicago Manual of Style's rules) in Editorial (see http://www.editorial-workflows.com/workflow/5247248250175488/_f57rqO3mos).
# -*- coding: utf-8 -*-
import linguistictagger
import re
import workflow
def capitalize_(s):
if re.search(r"[A-Z]", s):
return s
else:

Keybase proof

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: