AppleScript fun: iTunes/Cog current music in Skype status

Skype Current Music
AppleScript is Power! AppleScript is Fun! AppleScript will take care of putting my current music from iTunes and/or (most important) Cog to my Skype status.
Yes, there are tons of programs that will do it for iTunes, but not for Cog. This script will do it for both, and you can have both running at same time – if iTunes is running but isn’t playing, Cog status will be posted. Cool, huh? (-:

The code is based on the snippets provided by some good people in these posts:

Thanks people!

Note: code updated on Tuesday 26-th of October – now your custom status message will be shown before music. Music will always be added after it (even if tracks change and music info is already in mood message it will be handled properly).
Updated on 30-th of October! Support for titles of streams added (webradios etc).
Updated on 9-th of January 2011: fixed bug with iTunes track title being periodically replaced with Cog track title in case both apps are running but iTunes is currently playing. Updated screenshots.

Continue reading

Liferay 5.2.3: custom URLs formats

Liferay SEO capabilities seems to be surprisingly weak when it comes to URL management. Consider an example: you’re trying to build a webapp that will be doing some abstract searches over some search data sources, and present the results on one page.

You want page to have URL like http://<host>%5B:<port>%5D/section/subsection/search/<keyword>%5B?someParam=<value>%5D
Particular goals: URL can be generated by other website that knows nothing of our Liferay-based portal internals, and it (URL) should be nice and bookmarkable.

On the page you want to have some portlets, provided by different development teams/vendors, that would get the keyword and present results. The portlets should be independent since new ones can be added over time, and you want to be able to order development of several new portlets in parallel via several independent vendors. Thus every portlet on page should be able to obtain <keyword> and <value> passed in URL to page.
Continue reading