Archive for Development

Modding that old XBox

If you’ve got an old junky XBox around, and would like to put something, well, *useful* on it, like XBMC, then I’ve got a great link for you which allows soft modding without having a copy of any of the exploitable games.

Patched xboxhdm 1.9 with exploits will allow you to boot another PC while hotswapping your XBox hard drive into that machine. It has all of the known exploits on it, I believe, so you don’t have to have your XBox connected to another machine or anything, nice and simple. After that, use a fully automated installer like Auto Installer Deluxe to do everything else for you.

So, don’t throw that XBox out, make it into something much better.

Comments

Deploying GWT Applications with Jetty

I’m not a big fan of tomcat, preferring Jetty where possible. Unfortunately there are a lot of catches involved with getting GWT applications working. I’ll try to break the changes down here. This assumes that you already have a GWT project built and made with projectCreator which you are migrating into Jetty.

1) Pull the start.jar, bin/jetty.sh script (which will be moved to the base of your distribution), lib and etc directories from your Jetty distribution, and put them in $DIST (your distribution directory)

2) Change your (appname)-shell script to be like the following:
JettyTest-shell

#!/bin/sh
GWT_HOME=/usr/lib/gwt
ENTRY_POINT=net.cognitiveconsulting.gwt.JettyTest
HOST_PAGE=JettyTest.html
APPDIR=`dirname $0`;
CPGWT=$APPDIR/src
CPGWT=$CPGWT:$GWT_HOME/gwt-user.jar
CPGWT=$CPGWT:$GWT_HOME/gwt-dev-linux.jar
java -cp $CPGWT com.google.gwt.dev.GWTShell -logLevel DEBUG -noserver -port 8080 "$@" $ENTRY_POINT/$HOST_PAGE

3) Change your (appname)-compile script to look like:
JettyTest-compile

#!/bin/sh
APPDIR=`dirname $0`;
echo "Compiling GWT portion of application ... "
java -cp "$APPDIR/src:$APPDIR/bin:/usr/lib/gwt/gwt-user.jar:/usr/lib/gwt/gwt-dev-linux.jar" com.google.gwt.dev.GWTCompiler -out "$APPDIR/webapps" "$@" net.cognitiveconsulting.gwt.JettyTest;
echo "Compiling native Java part of application ... "
ant -f net.cognitiveconsulting.gwt.JettyTest.ant.xml
echo "Moving pieces into Jetty library path ... "
( cd bin ; jar cf ../lib/net.cognitiveconsulting.gwt.JettyTest.jar * )

Remember, after this, your output directory is no longer www, it’s now “webapps”.

4) Create the directory $DIST/webapps/(appname)/WEB-INF, and create a web.xml file like this, with the definitions for your remote services:
webapps/net.cognitiveconsulting.gwt.JettyTest/WEB-INF/web.xml


  [servlet]
    [servlet-name]Test[/servlet-name]
    [servlet-class]net.cognitiveconsulting.gwt.server.TestImpl[/servlet-class]
  [/servlet]

  [servlet-mapping]
    [servlet-name]Test[/servlet-name]
    [url-pattern]/rpc/net.cognitiveconsulting.gwt.client.Test[/url-pattern]
  [/servlet-mapping]

(Please note that because wordpress ate my XML, I used a different kind of brackets, please substitute as required.)

5) Create the ant build file:
/usr/lib/gwt/projectCreator -ant net.cognitiveconsulting.gwt.JettyTest

6) Make sure you have created working servlets under the internal tomcat implementation before you proceed, making sure that the servlet information is in the .gwt.xml file in your source directory like this:

7) Make sure that a copy of $GWTDIR/gwt-servlet.jar and any other libraries you are using are installed in $DIST/lib — forget this and nothing is going to work.

8) Create an empty “logs” directory under $DIST.

You should be able to start Jetty at your convenience and browse to the (appname)/(startpage).html page. If you want to pack it as a war, just zip the (appname) directory in $DIST/webapps with a .war extension. Also, running jetty.sh with the parameter “supervise” will allow you to watch the logs as they go by.

Hope this has been informative and helpful.

UPDATE: Jan, one of the webtide guys, was nice enough to send me an ant build file which does much the same type of thing I was attempting to do here. It is attached here, for anyone else who would like a copy.

Comments (2)

Improved Film Noir rendering

Thanks to my brother, who is much better with gimp-perl than I am, there’s a vastly improved version of the original RenderFilmNoir.pl script, available here.

If you get a chance (shameless plug), please patronize his Flickr page, as we does work very hard at being a great photographer …

Comments

Nokia 770 makes appearance in Hollywood

The Nokia 770 turned up as a prop in the summer movie “Fantastic Four: Rise of the Silver Surfer”. Having read the actual source material, I can’t say I was impressed by the movie, but I really have to give credit to anyone who would feature a gadget like the 770 in anything. I saw a few livejournal entries on the same subject, but they seemed to like it. Well, if I’m going so far as to admit that I actually not only watched this particular stinker, but actually paid enough attention to see a Nokia 770 …

Comments

Linux support for ADS DVD Xpress DX2

I take no credit for this at all, but the maintainer of the go7007 linux driver recently added support for the ADS DVD Xpress DX2 (which until recently was conveniently available at Walmart and other retail stores) after I took a picture of the board and asked him *very* nicely. If you get any kind of mileage out of it and decide that you really *have* to send someone money, please send it to him. (To avoid spam, check out the name of the package maintainer.)

I’m posting a copy of this as a kind of public service, since I haven’t seen any upstream releases in a while. Disclaimer that your mileage may very. I have had great luck with this, and have used it to preserve old VHS content … I would also recommend using the ffrecord tool, since it has better av sync than the included tools.

Original driver : http://oss.wischip.com/wis-go7007-linux-0.9.8.tar.bz2
Patch : http://jeff.ourexchange.net/wp-content/uploads/2007/07/wis-go7007-linux-20061021diff.gz
Site for device : www.adstech.com

Comments

Cisco VPN Client with Ubuntu Feisty

I worked out a simple patch to get the Cisco VPN client working with Ubuntu Feisty, which I’m attaching here.

Comments

Slowly but surely

I’m still hard at work on FreeMED 0.9.0 ; it is turning out to be a very long and involved process. A ton of new functionality is making its way in, along with architectural improvements and porting old functionality. The majority of the codebase has been torn out and rewritten, mostly to allow for complete separation between UI and the data model.

This entire process has been very educational, and I think I have learned more than I ever *wanted* to learn about UI programming. Hopefully this will be worth the wait for everyone … it’s looking like the majority of the framework is in place, and porting old modules to the new framework is what is left to be done.

Comments (1)

No more hotlinking images

For those who use Apache 2.x, this is a nice trick to keep people from hotlinking your images. I’ve seen a few variants of it, but this one I picked up most recently from a slashdot comment, of all places.

Make sure you have enabled mod_rewrite, then add this in your .htaccess file for any directory with images in it:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yourdomain\.com [NC]
RewriteRule .* /files/goatse.jpg [NC,L]

to redirect to an awful image, or use my own personal variant:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?sitename.com/.*$ [NC]
RewriteRule \.(gif|jpg|png)$ - [F]

which doesn’t return *anything* if someone else hotlinks your images. If they like your images enough, they can like them enough to save a copy on their own webserver.

Comments

WRT54G Multiple External IP Trick

To assign multiple external IP addresses to a WRT54G/S, you have to push a multiline variable into the rc_firewal nvram variable (non-volatile ram):


nvram set rc_firewal="
iptables -t nat -I PREROUTING -d x.y.z.1 -j DNAT --to-destination 192.168.1.x
iptables -t nat -I PREROUTING -d x.y.z.2 -j DNAT --to-destination 192.168.1.x
"
nvram commit

This will protect the changes against being lost when the router is reset.

Comments (2)

Ubuntu Dapper studio patched kernel 2.6.17

I have compiled an initial 2.6.17 kernel for Ubuntu Dapper Drake, as described on ubuntustudio.com. It has the EVMS patch needed by Ubuntu as well as the realtime patch installed. This version is not usplash patched. Files : kernel-headers-2.6.17-rt7_1_i386.deb, kernel-image-2.6.17-rt7_1_i386.deb

Comments

« Previous entries · Next entries »