- Find your profile folder.
- In it, create a folder named "searchplugins" (without the quotes) if it doesn't exists.
- Save this xml file in it.
- (Re)start Thunderbird.
- Select some text in any mail, right clic and search with bing (sorry).
- Click the DuckDuckGo icon on the left.
- Click the heart icon on the bottom left.
- That's all!
Alfred.app Glassfish workflow
I recently bought the Alfred.app Powerpack. It is byfar the best application launcher / automation engine I've ever used. One of the new features of the second version of this application is user customizable workflows.
In my daily activities, I start, stop, restart and kill my Glassfish server several times a day. In order to save me a few keystrokes and a few alt-tabbing, I created this small workflow allowing me to manage my local Glassfish instance.
You can find the Alfred worfklow at the following url http://bit.ly/alfred-glassfish. You will probably need to adapt the GF_PATH variable in the script to point to the root of your Glassfish installation.
Once this small step is done, you'll end up with the following prompt in your Alfred :
Wicket 6 + CDI on Heroku
As an Apache Wicket user for more than five years I really enjoy its programming model. I recently played with Play Framework 2.1 and Scala and discovered that deploying to Heroku is as easy as a git push. I wondered how difficult it could be using this mechanism to deploy a Wicket application.
Existing attempts
My initial investigation led me to this blog post from Martijn Dashorst explaining how to deploy a Wicket 1.5 application to Heroku, the service has slightly evolved since and the quickstart no longer deploys (Maven repository is no longer available to the run environment).
Adding JPA in the mix
I adapted it to deploy and use Wicket 6 instead of 1.5. And as I am a CDI fan I completed the quickstart with the CDI Wicket module (inspired from this post from Igor Vaynberg) and made the necessary steps to use the heroku bundled PostgreSQL database as a JPA datasource.
The key to make the database works correctly on Heroku resides in the following code snippet, where we parse the provided environment variable to populate hibernate properties.
Session replication
On Wicket mailing lists, a user recently asked the steps required to get the data store works correctly on Heroku (as the disk space is ephemeral), the key is using a NoSQL backend like Redis. So I wrote a simple and basic implementation of IDataStore using Redis (I think it can be optimized by someone familiar with Redis, pull requests are welcome).
Hands on
The quickstart can be found
at the following address
and deploys fine on a stack with
Redis Cloud and PostgreSQL add
ons enabled.
In the end you got :
- Wicket 6
- CDI via Weld
- JPA with PostgreSQL
- Redis datastore
You can see it live at the following address : http://wicket-6-sample.herokuapp.com/, the app can take a few seconds to start, as Heroku will stop it if it is idling for too long.