Let’s encrypt for www and non-www

I enabled letsencrypt for brie.com today. Turns out for www and non-www, you have to give it the -d option for the www.brie.com and the -d option for the non-www domain. It works now for both. Yay for letsencrypt.

As root, do the following on Debian Squeeze.

# certbot --authenticator standalone --installer apache \
 -d brie.com -d www.brie.com --pre-hook "service apache2 stop" --post-hook "service apache2 start"

Posted in Debian | Comments Off on Let’s encrypt for www and non-www

Madbomber2 development using SDL2

I have been working on redeveloping Bill Kendrick’s Madbomber game so that it runs on Android. Bill originally wrote Madbomber back in 1999 in SDL1. When I bought the Android Nexus 7 tablet, I thought that it would be a good platform for running madbomber as it has become a popular game platform. SDL2 now supports Android, so I have been rewriting it for SDL2. I also made the source so that it uses autoconf, so that it will check for proper libraries. I haven’t done a full release of the Android version of the game, but once I do the release of the Android game, I will publish the source for the Android. It’s actually the same source, put you just have to put into the Android build framework. Check out Madbomber2 sources.

Posted in Uncategorized | Comments Off on Madbomber2 development using SDL2

Updated Raffle app so that winner can choose his prize

I updated the Raffle application so that the winner can choose his prize. I need to get this on Git. In the meantime, check the source here. It still has it so that you can pick a prize and then a random winner.



Posted in Uncategorized | Comments Off on Updated Raffle app so that winner can choose his prize

Cereal Hack Raffle Application

Willow Schlanger and I participated in the Cereal Hack this last weekend. We built a Raffle application. We both worked in parallel. Willow built a version in PHP and I did mine in Java. Willow’s app was the most functional in the time for our 3 minute presentation. We didn’t win any awards, but our presentation went well. I continued to work on my Java version. You can download my Java version at the following link:


raffle08.zip is the version at the time of this writing.

I hope to put a link to Willow’s code soon.


Posted in Uncategorized | Comments Off on Cereal Hack Raffle Application

Running JBoss Application Server

This is about the JBoss Application Server, commonly known as JBoss AS. I have some posts that need the JBoss application server. If you visit the JBoss website, you will notice many projects that fall under it. Make sure you look for the application server.

Download JBoss AS server from the download site. http://www.jboss.org




Unzip or untar it.


some_path$ tar zxf jboss-as-7.1.1.Final.tar.gz


c:\some_path> unzip jboss-as-7.1.1.Final.zip

Note the path where you started it. If you are using Maven from a different window, set the JBOSS_HOME to it in a different console. Replace <some_path> with the actual value.


 set JBOSS_HOME=<some_path>


 $ export JBOSS_HOME=<some_path>

After downloading it, change to the bin directory and start it as follows:


$ cd bin
$ ./standalone


c:\some_path> cd bin
c:\some_path\bin> standalone.bat

JBoss AS should start. Go to your web browser and check it out. http://localhost:8080

Posted in Java | Comments Off on Running JBoss Application Server


I have some projects that use Maven. Here are the steps to get maven. Go to the Maven website. There is Maven 2 and Maven 3. Get the Maven 3 download. The name of the download is the following:


If you are using Windows, you can download the version with the zip extension. Download it and unpack it on your local drive. Now add it to your path.

  • Linux (bash)
    export PATH=<Maven_home_directory>/bin
  • Windows
    set PATH=<Maven_home_directory>/bin;%path%

Now test it with the following command:

mvn -version

You should see version output similar to the following:

brian@rt13:~$ mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 00:44:56-0800)
Maven home: /home/brian/pkg/apache-maven-3.0.4
Java version: 1.6.0_18, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8

You now have Maven working.

Posted in Java | Comments Off on Maven

Changed comment policy

In order to comment, you have to be registered now. I thought the re-Captcha would cut out spam comments, but either there are good re-Captcha crackers out there, or a lot of people looking for trackback links. I am assuming trackback is the correct term. I am also not sure if WordPress is protecting against cross site scripting attacks as it seems to allow all html characters.

I have still been hacking a lot of Java EE stuff and I hope to post more.

Posted in Uncategorized | Comments Off on Changed comment policy

Some code would be nice!

We shall see if this turns to code.

   public class Hello {
      public static void main(String[] args) {
        System.out.println("Hello World!");
    class Example
      def example(arg1)
        return "Hello: " + arg1.to_s
#include <stdio.h>
int main(void) {
    printf("Hello World\n");
    return 0;
Posted in Uncategorized | Comments Off on Some code would be nice!

Using Flex SDK on Linux

I just ran into a great post for integrating the Flex SDK with Eclipse. Adobe makes a free software version of the Flex SDK. When you look around for getting started with Flex Builder, just about everything points to Flex Builder, which isn’t available for GNU/Linux anymore. It is built on top of Eclipse, so I don’t know why adobe did this, but it is just one more reason to use free software tools that some vendor can’t jerk you in their direction. Springsource has some great projects working with the Flex SDK.

Posted in Uncategorized | Comments Off on Using Flex SDK on Linux

Detachable Models with Wicket (Attempt one)

Here is the Code. To run it, unzip it. You need Java and Maven. To run it and view it, just issue mvn jetty:run . Point your browser to http://localhost:8080 . You can also import it into Eclipse using File->Import->Existing Projects into Workspace and then select the directory where you unzipped it. This is built upon code created for the Wicket In Action book, although the example in the book (Chapter 4.3) for this area is just fragments that compile, yet don’t run.

The great thing about Wicket is that it stores the state on the server and can work with the back button. The bad thing about this is that the Wicket models you provide for your pages get serialized and stored in a cache. Create a successful website and you may be doomed to a lot of cache of repeated that was content fetched from the database. Wicket uses what is calls detachable models to counter this problem. This sample has the detachable model working, yet I am not sure it is doing its job. The good part is that it works and now it is just a process of seeing where the problem lies. Caching is supposed to work so that when state is saved, the objects contained in the LoadableDetachableModel are not serialized. At load time, it uses the load method. Download the code and look at the following areas.

First, I created the html for a list view.


<div wicket:id="cheeses">
<h3 wicket:id="name">Gouda</h3>
<p wicket:id="description">Gouda is a Dutch...</p>
<span wicket:id="price">$1.99</span>
<a wicket:id="add" href="#">add to cart</a>

Then I created the Index.java that corresponds to the html.


public class Index extends CheesrPage {
public Index() {

// LoadableDetachableModel<List<Cheese>>
CheeseDetach myDetach = new CheeseDetach(getDAO());
// ListView<Cheese> bound to "cheese" on html
CheeseList myCheeseList = new CheeseList("cheeses", myDetach, getCart());
// Add it to the page

The java code above creates a LoadableDetachableModel called myDetach. It uses a CheeseDAO by calling getDAO() to construct it. Then, it creates a ListView called myCheeseList passing the myDetach (LoadableDetachableModel) to it. It finally adds it to the page.

The interface for CheeseDAO extends Serializable. I had to do this so it would not
produce errors.

public interface CheeseDAO extends java.io.Serializable {
public Cheese getCheese(Long id);
public List<Cheese> getCheeses();

This is troubling. It should not produce errors if it is not trying to serialize it. Ugh! Remove the extends java.io.Serializable from the interface, recompile and watch the output as it runs. It will throw an error (or is it an exception that recovers?) complaining that it is not serializable. Ugh again!

The bonus side is that I did get an LoadableDetachableModel working for a ListView. That was a little tricky! I may be complaining about nothing. Look at the following files from the code.

  • Index.java
  • CheeseDAO.java
  • CheeseDAOImpl.java
  • CheeseDetach.java
  • CheeseList.java

These files contain the essential details. I hope to gain more insight as to whether this really is not caching.

Posted in Wicket | Comments Off on Detachable Models with Wicket (Attempt one)