Archive for development

10 letter words with no duplicate letters

egrep '^[a-z].{9}$' /usr/share/dict/words \
| awk '{ 
    ok = 1; 
    for ( i=1; i<=length($0); i++) { 
        c = substr( $0, i, 1 );  
        if ( counts[ c ] ) { 
            ok = 0; 
        counts[ c ] = 1;
  if ( ok ) print $0;
  delete counts; 

Leave a Comment

spring amqp tuning

It looked like the spring amqp listenerr wass about 4x slower than a simple client!

sending messages 100000 messages
sent messages

That’s spring: 2380/s versus raw 7692/s

The amqp SimpleMessageListenerContainer versus a simplistic client with com.rabbitmq.client.QueueingConsumer using com.rabbitmq.client.Channel.basicConsume

Using spring-integration-amqp 2.2.1.RELEASE and rabbitmq amqp-client 3.0.2

I randomly bumped up some settings like so:


This brought things much more in bounds:


That’s spring: 6250/s versus raw 7142/s, which is much more reasonable.

CAVEAT: I tried turning up “concurrency” from 1 to 2 and some messages went missing… so… dunna do it!

Leave a Comment

mac port stuff broke svn

So… today I was trying to install some junk with mac port with no luck (ended up getting the source myself and compiling it).

As a parting gift, it broke subversion for me:

$ svn status
dyld: Library not loaded: /opt/local/lib/libaprutil-1.0.dylib
  Referenced from: /opt/local/bin/svn 
  Reason: Incompatible library version: svn requires version 5.0.0 or later, but libaprutil-1.0.dylib provides version 4.0.0
Trace/BPT trap

Great! Getting stuff done at work is overrated… instead maybe I can spend 20-30 minutes trying to unfck this!

Eventually, I came across enough hints to run this magic:

$ sudo port -R upgrade gettext

Now svn worked, but complained:

$ svn status
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: Working copy '/Users/username/src/co/work/xo/some-stuff' is too old (format 10, created by Subversion 1.6)

Interestingly… in shells that were started before the port shenanigans, the output from “svn –version –quiet” says “1.6.16” and new shells say “1.7.8”

Now all I have to do is run “svn upgrade” in any directories I checked out with the 1.6 version…

Hope this helps someone…

Leave a Comment

breakfast before the gym

Before I go to the gym, I eat breakfast.

I know there are some who like to burn off the last of the glycogen stored in the muscle tissue from the night before and eat afterwards, but I think this is taking things a little too far.

Breakfast for me is made of two parts: coffee and eggs.

For eggs, I do this:

  1. spray a bowl with cooking oil stuff
  2. add 3 frozen banquet sausages
  3. nuke for 30 seconds (ymmv)
  4. cut ’em up with the fork
  5. add 2 eggs and a handful of spinach
  6. nuke for 60 seconds
  7. stir everything up
  8. add a handful of mushrooms
  9. add a handful of cheese
  10. nuke for 60 seconds

While that’s going on, I make coffee.

I used to use the french press, but lately I saved some bother by setting the timer on the drip coffee maker.

I put this stuff into the blender:

  1. enuff coffee for 2-3 mugs
  2. 2 scoops of whey protein
  3. 2 tablespoons of butter
  4. 2 tablespoons of coconut oil
  5. some cocoa powder
  6. couple of squirts of liquid sucralose

Run the blender for a couple of seconds and done.

I drink a mug or so with my eggs and take a full mug along for the ride.

I’m usually up at 5 (weekdays), and out of the house by 5:30 (ideally) or 5:45 (real world).

Getting out by 5:30 is a lot easier if I pack all my gym bag and lunch the night before, but sometimes the laziness prevents this.


Leave a Comment

mac port problem: dyld: Library not loaded: /opt/local/lib/libintl.8.dylib

So… I updated mac ports and it went batsh!t insane and everything broke:

derp[10:14:40]: git init
dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
  Referenced from: /opt/local/bin/git
  Reason: image not found
Trace/BPT trap

well done!

Luckily… some other apps had this missing bullsh!t installed (locate ftw) so I was able to “fix” it with this:

sudo cp -i /Applications/ /opt/local/lib/libintl.8.dylib



Leave a Comment

b3ge resurrection

Trying to dust some of b3ge off… it is were I left it… half finished and broken, but maybe it can be useful.

svn checkout b3ge-read-only
cd b3ge-read-only
haxelib install physaxe 
haxelib install hxJson2
haxe -main us.versus.them.b3ge.phyxside.Flipper -swf flip.swf -swf-header 640:480:32:DDDDFF -swf-version 9 -swf-lib resources.swf -lib physaxe

The boards are svg, like welcome.svg and

I wanted to redo the way the boards work and write a custom rendered to make sprites instead of shapes, but…

In case you are feeling too lazy to co and compile: flip.swf

Click on it to get started and move with the arrow keys

Leave a Comment

what your parents never told you about planet ass

A while back (June of 2010), I had some fun writing a little screensaver for my mac. I was really surprised how easy it was versus other platforms I’d tried before (windows and linux).

Writing a program that will run as a screensaver is really operating system specific and it was cool the mac was so ez!

My original effort was pretty lame, but got the plumbing and the openGL and I always meant to get back to it.

The other day, I wrote a small shell script around my old project which would use it as a template to create a new screensaver:

$ ./ PlanetAss

This is how Planet Ass was born!

It’s checked into github if you want to fool with it

I put up a build of it, but dunno exactly where it can run… I works on my 10.6.8 intel guy…

It’s there is you wanna fiddle with it / use it! Have fun!

Leave a Comment

Older Posts »