Learnings for Week 34 2010
- In the latest version of X11 (on Snow Leopard at least) there is an option in the preferences to allow clicks to go through windows. This makes applications like Gimp actually usable in OS X since you don’t have to click twice anymore (once to activate the window and another time to click the actual tool or menu you wanted)
- The Asterisk background command can take multiple files to play, each joined by ‘&’
- Adhearsions get_digits, :play[“file1”, “file2”…] plays the files in order and is interruptible by pressing a key, much like the Asterisk background command.
- If naming a class/module/file with the same name as something in the Ruby Standard Library they should be scoped by a unique name to prevent clashes.
- Rails adds ‘collection_ids’ method to models that have a belongs_to association. This gets you all the ids of the associated objects in an array. ex:
- If you’re having trouble with the Glassfish Admin not loading it could be it’s trying to check for updates over the network. We found some good instructions on how to disable this by editing the glassfish domain.xml and removing some jars. Note that in our setup the xml file was at
- Update the
<java-config> <jvm-options>-Dcom.sun.enterprise.tools.admingui.NO_NETWORK=true</jvm-options> </java-config>
- Remove update tool jar (Backup and remove this JAR)
- Delete this dir:
- To follow redirects with curl add the -L option
curl -L http://example.com
- We watch a new webcast on JRuby that highlights a few interesting features, most notable being that the next version of JRuby and warbler will allow you to build a executable jar file with a embedded web server. This is also interesting because you can have it only package class files so you don’t need to distribute your source with the application.
- Also from the JRuby webcast some interesting tools: