February, 2013 | Chris Page

Inject jQuery on any website

Feb 20

I spent some time Googling around for javascript injection techniques, and stumbled on a neat little bookmarklet that allows you to inject jQuery into any website, and then use the FireBug console to play around with the page. In addition to how much fun this is, having the smooth jQuery syntax at your fingertips mixed in with FireBug is a great debugging technique for developers.

Many kudos goes to Karl Swedberg for posting his bookmarklet and technique at http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet/.

Go check it out!

Twig Syntax Highlighting with TextMate

Feb 18

What is Twig?

Twig – The flexible, fast, and secure template language for PHP. Brought to you by Fabien Potencier, creator of the Symfony Framework.

What is TextMate?

TextMate is a general-purpose GUI text editor for Mac OS X created by Allan Odgaard. Notable features include declarative customizations, tabs for open documents, recordable macros, folding sections and snippets, shell integration, and an extensible bundle system.” — Wikipedia

What is cool that I’m sharing with you today?

A nice little Twig syntax highlighting bundle for TextMate, made by Andrew Fricke. You can checkout the code from Andrew’s Github Repo:


Steps to install the bundle on Mac OSX:

mkdir -p ~/Library/Application Support/TextMate/Bundles
cd ~/Library/Application Support/TextMate/Bundles
git clone https://github.com/Anomareh/PHP-Twig.tmbundle
osascript -e 'tell app "TextMate" to reload bundles'

Restart TextMate, and enjoy syntax highlighting of your .twig files!