EricFromCanada.bitbucket.org / README.rst

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.

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.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.