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; 
            break; 
        }
        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
13:{"spring":{"bytes":91479,"messages":4450,"rate":342},"raw":{"bytes":2188890,"messages":100000,"rate":7692}}
23:{"spring":{"bytes":808060,"messages":37236,"rate":1618},"raw":{"bytes":2188890,"messages":100000,"rate":7692}}
34:{"spring":{"bytes":1559932,"messages":71411,"rate":2100},"raw":{"bytes":2188890,"messages":100000,"rate":7692}}
44:{"spring":{"bytes":2188890,"messages":100000,"rate":2380},"raw":{"bytes":2188890,"messages":100000,"rate":7692}}

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:

<rabbit:listener-container 
    connection-factory="rabbitConnectionFactory" 
    prefetch="500" 
    transaction-size="250"
>

This brought things much more in bounds:

20:{"spring":{"bytes":2188890,"messages":100000,"rate":6250},"raw":{"bytes":2188890,"messages":100000,"rate":7142}}

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.

Anyway…

Leave a Comment

basic work out gear

Here are a few things that are useful for the gym.

What to wear:

  • t-shirt or tank top (sexy ladies only, plz!)
  • shorts
  • sports bra (do I need to say “for the ladies” on this?)
  • tennis shoes
  • socks
  • bandana / dew rag / headband / etc for sweat management
  • weight lifting gloves

You’ll also want to carry these with you while working out:

  • water bottle
  • handle towel (for sweat)

In my gym, there are paper towels + spray to wipe down equipment after use.

Other random things you’ll need are:

  • a gym bag
  • plastic shopping bag(s) for wet workout clothes
  • lock for your locker

For shower time, you’ll need:

  • shower shoes (flip flops, etc)
  • towel
  • deodorant
  • brush / comb / etc
  • whatever random grooming junk you need

If you have a lot of junk for the locker room, you might want a separate bag for toilletries.

A few odds and ends that may be useful:

  • acetaminophen, etc
  • icy-hot stuff
  • arnica stuff, etc

Depending on what you are doing, you might consider some entertainment options:

  • mp3 player + headphones
  • kindle / magazines (mostly for slack cyclist types)

If you go to the gym before work, you will probly want to bring your work clothes on a hanger. I usually leave my work shoes (which are very easy to forget) in the trunk and walk out in my gym shoes. Then I swap bags and change shoes. For some reason, carrying shoes is annoying unless you have a huge gym bag (which is also a pain).

Anyway… that’s all I can think of right now…

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/Wireshark.app/Contents/Resources/lib/libintl.8.dylib /opt/local/lib/libintl.8.dylib

 

ymmv.

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 http://b3ge.googlecode.com/svn/trunk/ 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
level.0001.svg.

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

Older Posts »