Skip to content

Instantly share code, notes, and snippets.

View derickfay's full-sized avatar

Derick Fay derickfay

View GitHub Profile
@derickfay
derickfay / fix_notes.applescript
Created April 16, 2015 16:55
Change Keynote Presenter Notes Font and Size for All Slides
tell application "Keynote"
tell document 1
set theSlides to slides
repeat with s in the slides
tell presenter notes of s
set font to "Helvetica"
set size to 24
end tell
end repeat
end tell
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# codercase.py
#
# 2014-08-28 by Derick Fay
#
# based almost entirely on jdc0589's CaseConversion plug-in for SublimeText:
# https://github.com/jdc0589/CaseConversion/blob/master/case_conversion.py
#
@derickfay
derickfay / night.less
Last active November 18, 2021 15:58
nighttime TaskPaper 3 theme
// UI Scale
@base-font-size: 16;
@user-font-size: $USER_FONT_SIZE;
@ui-scale: @user-font-size / @base-font-size;
// UI Colors
@tint-color: rgb(173,216,230);
@handle-color: black;
@collapsed-color: red;
@derickfay
derickfay / Place Markdown Link of BibDesk Item on Clipboard
Last active October 17, 2021 19:56 — forked from fractaledmind/Insert Markdown Link of BibDesk Item into TextMate
Copies to clipboard to remove dependency on a particular editor. Displays Cite Key as well as Title in selection dialog.
tell application "DEVONthink 3"
set theBases to databases
set theList to {}
set myitems12345 to {}
repeat with b in theBases
tell b
set theRecs to (every record whose type is group) & (every record whose type is smart group)
repeat with r in theRecs
set title to {title:name of r}
@derickfay
derickfay / MergeAllFinderWindows
Last active February 18, 2021 01:39
Merge all Finder windows - uses UI Applescript to execute the Finder menu command. There's a more error-proof version (not mine) in an Alfred workflow here: http://www.alfredforum.com/topic/3363-mavericks-merge-all-finder-windows/
tell application "System Events"
click menu item "Merge All Windows" of menu "Window" of menu bar item "Window" of menu bar 1 of application process "Finder" of application "System Events"
end tell
@derickfay
derickfay / btt-skim.json
Last active October 1, 2020 19:49
Skim Touch Bar preset
[
{
"BTTTouchBarButtonName" : "P",
"BTTTriggerType" : 629,
"BTTTriggerClass" : "BTTTriggerTypeTouchBar",
"BTTPredefinedActionType" : 172,
"BTTPredefinedActionName" : "Run Apple Script (blocking)",
"BTTInlineAppleScript" : "tell application \"BetterTouchTool\"\r\t(* light purple *)\r\tupdate_trigger \"625CCE43-9BF7-403E-8AEF-331CA96BBD0E\" json \"{\\\"BTTTriggerConfig\\\":{\\\"BTTTouchBarButtonColor\\\" : \\\"204,102,255,100\\\"}}\"\r\t(* dim yellow *)\r\tupdate_trigger \"701399EC-B8BF-472D-8A2E-4F9FB5F01F75\" json \"{\\\"BTTTriggerConfig\\\":{\\\"BTTTouchBarButtonColor\\\" : \\\"0,0,0,20\\\"}}\"\r\t(* dim green *)\r\tupdate_trigger \"E395E5B6-E655-47EA-BDD1-F6BE0086BE3B\" json \"{\\\"BTTTriggerConfig\\\":{\\\"BTTTouchBarButtonColor\\\" : \\\"0,0,0,20\\\"}}\"\r\t(* dim text selection *)\r\tupdate_trigger \"E5BDF354-1D20-414A-A7B8-A2861F299A3B\" json \"{\\\"BTTTriggerConfig\\\":{\\\"BTTTouchBarButtonColor\\\" : \\\"0,0,0,20\\\"}}\"\r\t(* dim underline *)\r\tupdate_trigger \"EC62F039-63
(* EXPORT ALL SKIM NOTES TO THE CLIPBOARD WITH MARKDOWN REFERENCE LINKS
(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
*)
@derickfay
derickfay / exportMarkdown.md
Created July 12, 2019 05:36
BibDesk Markdown export template

<$publications> <$pubType=book?> <$pubAuthors.abbreviatedNormalizedName.stringByRemovingTeX.@componentsJoinedByCommaAndAnd/> <$pubFields.Year/>. <$pubFields.Title/>. <$pubFields.Address/>: <$pubFields.Publisher/>.

<$pubAuthors.abbreviatedNormalizedName.stringByRemovingTeX.@componentsJoinedByCommaAndAnd/> <$pubFields.Year/>. <$pubFields.Title/>. In <$pubFields.Booktitle/>. <$pubEditors.abbreviatedNormalizedName.stringByRemovingTeX.@componentsJoinedByCommaAndAnd/>, eds. <$pubFields.Pages?>Pp. <$pubFields.Pages/></$pubFields.Pages?>. <$pubFields.Address/>: <$pubFields.Publisher/>.

$pubType=article?>

@derickfay
derickfay / sk2c single note templated.applescript
Created March 9, 2019 23:49
Export selected Skim notes to the clipboard using native Skim templates
(* EXPORT SELECTED 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
2019-03-10 by derickfay
*)
property LF : (ASCII character 10)