Various pieces of code I’ve written, in case someone else finds them useful.
- arrange windows
- Arranges windows for specified applications across two screens, because application windows don’t preserve their positions on an external display if it’s unplugged or sleeps (unless “Displays have separate Spaces” is enabled). More info here.
- close Safari Web Inspector
- Before Safari 6, the Web Inspector shortcut would only open it. Attach this AppleScript to another shortcut to make it closable.
- HTMLize Selected Text
- Runs selected text through Markdown.pl and SmartyPants.pl, and converts any MacRoman non-ASCII characters to HTML entities. (A relic from before UTF-8 was the standard online.)
- Uses the logic from HTMLize Selected Text to prepare a Journler entry for submission to Blogger. Includes the ability to convert rich text styles to HTML.
- Handy if you have a bunch of servers you need to install your SSH key onto and don’t have ssh-copy-id.
- Use this to generate an htdigest file of users from an svnserve passwd file. Useful if you have a Trac installation using HTTPAuth and you need to grant your SVN users access.
- Creates a Time Machine bundle for the current Mac with larger 128MB band files (up from 8MB) to improve performance when backing up to a non-HFS+ NAS.
- reStructuredText codeless language module
- Language module for BBEdit and TextWrangler which highlights elements in reStructuredText files and lists section titles in the function pop-up menu. Recognizes both standard reST directives and Sphinx additions. See its comments for my recommended editor settings.
- Lasso codeless language module
- Language module for BBEdit and TextWrangler which adds both Lasso 8- and 9-style type and function names to the function menu, and highlights elements not supported by the current BBEdit language module such as ticked strings, tag literals, and variables.
- Apache 2.4 Configuration codeless language module
- Update of John Gruber’s Apache Configuration Language Module to include variables, Apache 2.4 keywords, and some bugfixes.
- Make codeless language module
- Update of BBEdit’s / TextWrangler’s built-in module to include more keywords from GNU make.
All these are also listed among the language modules at BBEdit Extras.
- Lasso lexer for highlight.js
- Contributed a lexer for the Lasso programming language for highlight.js, a JS-based syntax highlighter. Included since version 7.4.
- Lasso lexer for code-prettify
- Also wrote a Lasso lexer for code-prettify, another JS-based syntax highlighter.
- Lasso domain for Sphinx
- Domain plugin for the Sphinx documentation processor, allowing it to handle descriptions of Lasso syntax.
- Lasso lexer for Pygments
- Contributed a lexer for the Lasso programming language for the Pygments syntax highlighter. Included since version 1.6.
- Contributed CSS, syntax highlighting, and request handling improvements to restview, a tool for previewing reST documents in a web browser.