Tuesday, November 30, 2010

is activemq running?

Activemq is listening on the 61616 port so a simple telnet can help us.

telnet localhost 61616

If you get a response that starts with '?ActiveMQ?' it means that activemq is running.

Simulating cellular network bandwith

To turn it on

sudo su
ipfw add pipe 1 src-port http
ipfw pipe 1 config delay 200 bw 700kbit/s

To reset

ipfw flush

Monday, November 29, 2010

Infinite blinking effect with jQuery

I'm not sure this is the shortest way to do this but it works.

setInterval( function () {

// this is the element you want to blink
var box = $(".blinking_thing");

if (box.data("fade") === 1) {
box.fadeIn().data("fade", 2);
} else {
box.fadeOut().data("fade", 1);
}, 800)

Thursday, November 25, 2010

activemq and the java.io.EOFException: Chunk stream does not exist at page on broker start

Deleting the activemq-data directory seems to be the only recovery solution (which is not an option in production)

rm -rf /opt/local/share/java/activemq/data

Thursday, November 18, 2010

Changing the computer name on terminal

sudo scutil --set HostName [NewMacComputerName]

Next flush the DNS cache on the Mac by entering the command:

dscacheutil -flushcache

Thursday, November 11, 2010

Removing 1Password agent on Snow Leopard

months after i uninstalled 1Password something was still spamming my log files.

It seemed like launchd has some problems, so i headed over one of the following folders


I found this entry


let's delete it and refresh launchd

launchctl remove ws.agile.1PasswordAgent

and the problem has gone.