Messing around with ruby-processing, take 5

I’ve been spending quite a bit of time playing with ruby-processing (and processing in general) recently. It’s also been my first exposure to JRuby which has been a bit of an eye-opener, in terms of the sheer number of Java libraries that it makes available in Ruby. All the fun stuff in processing seems to be OpenGL-related, and after a lot of research the easiest way to dig in ended up being the GLGraphics Java library, which was made specifically for use in processing. ...

May 31, 2012 · 2 min · Dave Perrett

Continuous integration for PHP with phpUnderControl

Whenever I start a new PHP project for a client, one of the first things I set up is usually phpUnderControl - a CI (continuous integration) server specifically for PHP built on top of CruiseControl. ...

May 13, 2011 · 12 min · Dave Perrett

Compiling and running red5 flash server on OSX

First, you need to make sure you are using java 1.6. I’m told this method will only work on 64-bit leopard machines, so your mileage may vary. In the finder, browse to /Applications/Utilities and open Java Preferences.app . ...

March 16, 2010 · 2 min · Dave Perrett

Compiling Nginx with flv streaming support on Ubuntu

First, we need to get the latest version of nginx : > wget http://nginx.org/download/nginx-0.8.34.tar.gz > tar xvzf nginx-0.8.34.tar.gz > cd nginx-0.8.34 Next, configure it to support ssl, gzip, flv streaming and real-ip. I generally compile it to /opt/nginx-YYMMDD (change the –prefix setting if you want to put it somewhere else) : ...

March 16, 2010 · 3 min · Dave Perrett

'Hello World' with Scala and Lift on OSX

Obviously we’re going to need scala before we can do anything useful; the easiest way to install it is via macports . We’re also going to need maven. > sudo port install scala > sudo port install maven2 Scala seems to have moved their repository to github, and the old google code repository no longer works. Assuming you have git installed (if not, there’s an OS X installer here) : ...

August 17, 2009 · 2 min · Dave Perrett

Adding Appfuse Dependencies

I recently had trouble importing the com.sun.media.jai imaging library into appfuse : The import com.sun.media.jai cannot be resolved To add a dependency in your pom.xml, first add the new repository (may not be strictly necessary if the library is already in the default appfuse repositories) : ...

December 5, 2007 · 1 min · Dave Perrett

Complex Constants in Java

If you want to assign a complex class (such as a HashMap / ArrayList etc) as a constant in Java, use the static initializer block construct : ...

December 5, 2007 · 1 min · Dave Perrett

Default Values With Hibernate Annotations

To set the default value of a field with Hibernate, you can use the columnDefinition argument : ...

December 5, 2007 · 1 min · Dave Perrett

Get complete AppFuse sources

To get the complete, exploded source of an AppFuse application, run : $ mvn appfuse:full-source

November 28, 2007 · 1 min · Dave Perrett

Appfuse "failed to lazily initialize a collection of role"

If you are getting a failed to lazily initialize a collection of role error in AppFuse , you need to un-comment the lazyLoadingFilter filter and associated filter-mapping in src/main/webapp/WEB-INF/web.xml . <filter> <filter-name>lazyLoadingFilter</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> </filter> <filter-mapping> <filter-name>lazyLoadingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>

November 27, 2007 · 1 min · Dave Perrett