2006-11-23

evidence of nonexistance

Believer: Worship the invisible pink unicorn.
Atheist: Sorry, I don't believe he exists.
Believer: Prove it.
Atheist: Huh?? Why should *I* come up with proof? Ok, I can try: I don't see him.
Believer: That is because he is invisible. Also he is pink. That is one of his divine properties.
Atheist: I don't hear him.
Believer: He only speak to believers. I hear him answer when I pray to him, I'm convinced of that.
Atheist: Ok, here I have an infrared camera. I don't see anything.
Believer: He doesn't emit heat.
Atheist: Ok, I throw around flour and see if anything stick to him, or if we see any footprints appearing.
Believer: Sorry, he is immaterial.
Atheist: Ok, what is the difference between a totally undetectable creature and one that doesn't exist?
Believer: When rain falls, the invisible pink unicorn caused it, whenever a child laughs, the IPU caused it. Also 6000 years of belief shows I am right.
Atheist: ...whatever.

2006-11-19

... and the man was parallelised

[0019] <   freespace> | help, i got concurrency issues
[0020] < freespace> | help, dead lock
[0020] < Ycros> | i concurrency issue help got


Cheers,
Steve

2006-11-16

Thrice Blessed Day

  1. Centrelink people were nice and helpful.

  2. ADSL2+ migration happened today.

  3. TPG helpdesk was nice and helpful, helped me fix my internet connection settings. For the record, LLC multiplex mode, VCI 8 and VPI 35.



Cheers,
Steve

2006-11-12

A somewhat useful bash script

I am one of those weird people who like to run a full screen X11 in OS X - its just me. This means of course I run into certain problems when I need to copy-n-paste between Aqua and X11.

Copying from Aqua into X11 works fine, but not the other way around. This means its extremely trouble some when I need to open a URL from IRC since I use irssi for IRC, running inside screen over ssh.

And thus the following bash script was born to let me select some text, press a key combination in fluxbox and open up safari with the selection, or to perform a search on wikipedia or google.

#!/bin/bash
MAX_LEN=32;
NON_URL_BUTTONS="google:1,wiki:2,define:3,cancel:99";
URL_BUTTONS="safari:0,cancel:99";

sel=`/Users/steve/usr/bin/xsel`;

if [ ${#sel} -eq 0 ]; then
xmessage -buttons ok -default ok -nearmouse "Empty selection!";
exit;
fi

hasurl=`expr "$sel" : '.*http://.*'`;
if [ $hasurl -gt 0 ]; then
sel=${sel#*http://};
sel=${sel%% *};
sel="http://$sel";
buttons=$URL_BUTTONS;
else
buttons=$NON_URL_BUTTONS;
fi

if [ ${#sel} -gt $MAX_LEN ]; then
label="${sel:0:$MAX_LEN}...";
else
label=$sel;
fi

xmessage -buttons $buttons -default `expr "$buttons" : '\(^[a-z]*\)'` -nearmouse "$label";

case $? in
0)
url="${sel}";
;;
1)
url="http://www.google.com/search?q=${sel}";
;;
2)
url="http://en.wikipedia.org/wiki/${sel}";
;;
3)
url="http://www.google.com/search?q=define:${sel}";
;;
99)
exit
;;
esac

url=${url// /%20};

echo "$url"
open /Applications/Safari.app/ "$url"


xsel used here is by Conrad Parker, and you may change xmessage to gmessage if that is more appealing to you.

Cheers,
Steve