Source

EricFromCanada.bitbucket.org /

Filename Size Date modified Message
applescript
bash
bbedit
javascript
lasso
python
2.9 KB
10.3 KB

ericfromcanada.bitbucket.org

Various pieces of code I've written, in case someone else finds them useful.

Browse all files

AppleScript

close Safari Web Inspector script
Before Safari 6, the Web Inspector shortcut would only open it. Attach this AppleScript to another shortcut to make it closeable.

bash

keyputter.sh
Handy if you have a bunch of servers you need to install your SSH key onto.
svn-user-htdigest.sh
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.

BBEdit

reST 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.

I recommend also setting these options for editing reStructuredText: enabling auto-indent and auto-expand tabs, setting tab width to 3 spaces, disabling soft wrap text, and setting the page guide to 80 characters.

JavaScript

touch-menus-plus.js

Makes navigation links with drop-down menus usable on iOS by only enabling the link if its submenu is visible. This is only required if JavaScript is used to hide and show submenus, since iOS accounts for CSS-based menus by preventing a :hover region's links from activating until any divs it'll reveal are displayed.

See it in action

Python

restview (improved)
My branch of the excellent restview, a tool for previewing reST documents in a web browser, with some improvements I made to the CSS, syntax highlighting, and request handling components.
Lasso lexer for Pygments
Contributed a lexer for the Lasso programming language for the Pygments syntax highlighter. Expect to see it included in Pygments 1.6.

Find me on Twitter.