Archive for June, 2008

Itunes remote

June 07th, 2008 | Category: applescript, itunes, mac os x

Technorati Tags: , ,

This nifty little application (http://www.delicioussuite.com/technology/deliciousfun/applications/remote_itunes.html) allows you to remotely control remote instances of itunes using remote applescript events (see http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh896.html on how to enable, you’ll need to make sure your account has a password).

Current limitations like sorting your list doesn’t work, but if you have a mac mini like I do for playing music/video/etc on your television, its a lot easier than flipping over to a VNC connection to hit ‘next’.

No comments

Grails AcegiSecurity Create User on BootStrap

June 05th, 2008 | Category: grails, j2ee, java

To create users on startup with a blank database:

Read more

2 comments

Using services from bootstrap.groovy in grails

June 04th, 2008 | Category: j2ee, java

I’m currently writing an application for some upcoming strutta.com functionality using grails.  During development though, I have it setup to recreate my data everytime I restart the server, and then I repopulate from a seperate source.

I do have a controller setup to manually import specific ids from the head end server, but its useful if I didn’t have to do this everything I hit ctrl-c in the wrong window.  Using a services orientated design, you seperate out logic from controllers (and is recommended by the grails guys), but if you need to call this from the bootup, you could follow the instructions on http://grails.org/Services (which doesn’t work…) or you could do:

import org.codehaus.groovy.grails.web.servlet.GrailsApplicationAttributes

class BootStrap {

  def init = { servletContext ->
    def ctx = servletContext.getAttribute(
GrailsApplicationAttributes.APPLICATION_CONTEXT);
    def ss = ctx.getBean("feedService");

    ss.loadFromFeed();
  }
  def destroy = {
  }
}
2 comments