This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* EXPORT ALL SKIM NOTES TO THE CLIPBOARD | |
(no longer) requires hackademic URL handler from github user smargh | |
entirely rewritten to take advantage of Skim's built-in templating | |
2016-06-26 by derickfay | |
2019-02-09 updated to group notes by color | |
*) | |
property LF : (ASCII character 10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on alfred_script(q) | |
set quote to first paragraph of q | |
set otd to AppleScript's text item delimiters | |
set AppleScript's text item delimiters to {"(Kindle Locations ", ")"} | |
set bits to every text item of q | |
set pageNumber to item 3 of bits | |
set quote to first paragraph of q | |
return quoted form of quote & " (" & pageNumber & ")" | |
set AppleScript's text item delimiters to otd | |
end alfred_script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// there are two parts to this text formatter. Both draw heavily from | |
// the date calculation snippets created by Brett Terpstra - see | |
// https://brettterpstra.com/2015/06/01/textexpander-5-javascript-snippets/ | |
// part 1 - the date library | |
// strftime for JS <http://hacks.bluesmoon.info/strftime/> | |
Date.prototype.locale = 'en-GB'; | |
Date.ext = {}; | |
Date.ext.util = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UI Scale | |
@base-font-size: 16; | |
@user-font-size: $USER_FONT_SIZE; | |
@ui-scale: @user-font-size / @base-font-size; | |
// UI Colors | |
@tint-color: darkblue; | |
@handle-color: white; | |
@collapsed-color: red; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"BTTTouchBarButtonName" : "Global", | |
"BTTTriggerType" : 629, | |
"BTTTriggerClass" : "BTTTriggerTypeTouchBar", | |
"BTTPredefinedActionType" : 190, | |
"BTTPredefinedActionName" : "Force Show\/Hide Global BTT Touch Bar Actions", | |
"BTTEnabled2" : 1, | |
"BTTUUID" : "937923F9-24F3-4AD7-883F-7DE9E2D3FA30", | |
"BTTEnabled" : 1, | |
"BTTOrder" : 5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// scraper for http://www.national.archsrch.gov.za/sm300cv/smws/sm300dl | |
// | |
// usage: select results in search results, enter multiple documents view, then copy contents of the results frame to a text file called archives.txt | |
const fieldnames = ["Document","DEPOT","SOURCE","TYPE","VOLUME_NO","SYSTEM","REFERENCE","PART","DESCRIPTION","STARTING","ENDING","REMARKS.*"] | |
const replacements = ["",",",",",",",",",",",",",",",",",",",",",""] | |
var fs = require('fs'); | |
var path = process.cwd(); | |
let d = fs.readFileSync(path + "/archives.txt").toString().replace(/\,/g," "); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ "$#" -ne 1 ] | |
then | |
echo "Usage: lstag <tag>" | |
exit 1 | |
fi | |
mdfind "kMDItemUserTags == '*$1*'" -onlyin . | sort --ignore-case | grep $PWD | grep -v ^$PWD/.*/.*$ | sed 's!.*/!!' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// See online documentation for examples | |
// http://getdrafts.com/scripting | |
var p = Prompt.create(); | |
p.title = ""; | |
p.message = ""; | |
p.addButton("Add to draft"); | |
p.addTextField("Enter text", "t",""); | |
var con = p.show(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* COPY CURRENT PAGE OF SKIM PDF TO CLIPBOARD | |
-- created by Stephen Margheim | |
-- 06 July 2013 | |
-- open source | |
edits by Derick Fay 2013-09-05: | |
-- edited to use clipboard | |
-- optimized for Alfred workflow to bypass Reference/Inline dialog box | |
-- 2013-09-11 modified to just add (page) and paste |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- TextExpander snippet to add recipient's name to email | |
-- based on http://macsparky.com/blog/2015/6/automatically-add-recipients-name-to-email-with-textexapnder [sic] | |
-- updated to handle hyphenated first names properly | |
-- ( Original version would return Young for Young-Hee . This version returns Young-Hee. ) | |
set theResult to "" | |
tell application "System Events" | |
tell process "Mail" | |
tell text field "To:" of window 1 |