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
set strJS to " | |
var xpathResults = document.evaluate('//*[@class=\\'r\\']/a', document, null, 0, null), | |
lst = [], | |
oNode; | |
while (oNode = xpathResults.iterateNext()) { | |
lst.push([ | |
'[', | |
oNode.text, | |
'](', |
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
# An lf command in my ~/.bash_profile | |
# like a simple ls, but selects the glob-matched files in the Finder | |
# `lf *.txt` to Finder-select all *.txt files in the working directory | |
# `lf *.[^t]?? to Finder-select all files with a 3-char extension which doesn't start with t | |
lf() { | |
local IFS=":"; local f=$@; local seln=""; fldr="$(pwd)" | |
for l in ${f[@]}; do | |
if [[ ! -d $l ]]; then | |
seln=$seln"file \"$l\", " | |
fi |
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
(() => { | |
'use strict'; | |
/* | |
A JavaScript for Automation script for BBEDIT | |
Cycle the case of selected text :: Mixed -> Upper -> Lower -> Mixed | |
(If the selection is collapsed, the nearest word will be selected) |
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
((options) => { | |
'use strict'; | |
// (NB JavaScript for Automation – JXA: Save as .scpt ) | |
// Selected DEVONthink Sheet -> DEVONthink markdown record (MMD table) | |
// (New record containing MMD table created is same group as selection) | |
// Uses original fileName stem, with '.md' appended. | |
// This is the *whitespace pretty-printed* version |
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
function run() { | |
// Rob Trew 2015 | |
// Ver 0.01 | |
// UI day/night toggling through OS X 10.10 JXA Javascript for Automation | |
// SWITCH FROM DAY-TIME DARK MENU BAR AND DOCK WITH DARK BACKGROUND | |
// TO NIGHT-TIME *ALL DARK* | |
// (TOGGLE MODE AND BACKGROUND TO BRIGHT, THEN INVERT ALL) |
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
-- Copyright (C) 2012 Robin Trew | |
-- | |
-- Permission is hereby granted, free of charge, | |
-- to any person obtaining a copy of this software | |
-- and associated documentation files (the "Software"), | |
-- to deal in the Software without restriction, | |
-- including without limitation the rights to use, copy, | |
-- modify, merge, publish, distribute, sublicense, | |
-- and/or sell copies of the Software, and to permit persons | |
-- to whom the Software is furnished to do so, |
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
-- Copyright (C) 2012 Robin Trew | |
-- | |
-- Permission is hereby granted, free of charge, | |
-- to any person obtaining a copy of this software | |
-- and associated documentation files (the "Software"), | |
-- to deal in the Software without restriction, | |
-- including without limitation the rights to use, copy, | |
-- modify, merge, publish, distribute, sublicense, | |
-- and/or sell copies of the Software, and to permit persons |
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
-- Permission is hereby granted, free of charge, | |
-- to any person obtaining a copy of this software | |
-- and associated documentation files (the "Software"), | |
-- to deal in the Software without restriction, | |
-- including without limitation the rights to use, copy, | |
-- modify, merge, publish, distribute, sublicense, | |
-- and/or sell copies of the Software, and to permit persons | |
-- to whom the Software is furnished to do so, | |
-- subject to the following conditions: |
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
-- Change first selected node to heading, | |
-- or deepen level if already heading | |
-- DEV 1.1 Script | |
property pstrType : "heading" | |
on run | |
tell application "FoldingText" | |
-- CHECK THAT THERE IS A DOCUMENT |
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
((options) => { | |
'use strict'; | |
// (NB JavaScript for Automation – JXA: Save as .scpt ) | |
// Selected DEVONthink Sheet -> DEVONthink markdown record (MMD table) | |
// (New record containing MMD table created is same group as selection) | |
// Uses original fileName stem, with '.md' appended. | |
// Default alignment string is centered ':--:' |
OlderNewer