Tuesday, 20 October 2009

motorbike fun: brake pad replace

On Sat (the 17th) I mostly changed brakepads on motorbike.


Rear ones first which really needed changing. I had felt them grate a little in past couple of weeks. When I took them off they still had a thing but full sliver of pad on them so they looked okay.

Really hard to push the  piston on the back wheel back. I opened the nipple on the caliper near the piston but that might be incorrect. Bent a clamp pushing in the piston. Sqeezed pads in and caliper on okay. Stan came when I was doing the front and we took the lid off the brake fluid resivoir. 4 pistons on front. I cleaned them with WD40 as much as possible. One side was much more gunged. Squeezed back using large mouthed pliers. Oops oil spill from resivoir into mittens.

Result seems okay. Front brakes are squeezing wheel though. Also front right mitt is just catching front brake lever a little. Might be a little tight. Back wheel is free. 

Was a wet day today. First proper wet day in ages. Rained on and slightly damp in morning. M50 to and from work.

diary / family news

Email from John from Oz. They're doing lots of trips and touristy things with Mum and Noreen. I replied with out news.

I didn't tell him I got a cold :( I've an annoying cough. MBleh! :(
Was out with exCommProve people Friday.
Cycled in and out of town.
Buenos Aires Grill. Mmmm Empanadas de carne. Mmmm Guarnacion de something ribe eye :). Pavlova was just merangue, hmmm not mmmm. Off to the very loud globe after that.

On Sat I mostly changed brakepads on motorbike. Lots of housework. Some kids clothes had tricky stains on them. Some gardening and picking up rubbish on green on Sunday. Fionn brought Daire to soccer and also brought girls and Jaliah with scooters +roller blades. I cooked risotto. 

Fionn was at residents meeting this evening.
The digging up of the green is nearly over now.
Big slice still fenced off but it's growing newly sown grass now.
 (rising water main from Stillorgan resivoir to higher ones for feeding all the loads of new construction in Sandyford area)
Also being installed is some playground equipment.
Hopefully it survives being constructed - older kids break in and are all over it the whole time.
 It seems to be surviving alright anyway.
   The little digger building the playground had windows broken - someone threw a firework in apparently. Hmm.
  Lots fireworks already for a few weeks now.

We're off to Cobh next weekend to visit Dad Sat then Limerick Sunday afternoon after Sunday dinner,
Daire's off with scouts camp in Larch hill for Halloween. That's the weekend following.
Kids are good.
Daire's busy - Soccer is new, tough as he's playing under 12s to be in same squad as a friend.
He's over on the MUGA loads with his friends.
Kate's really good at the gymnastics. She did some for show and tell in school and she teaches us some at home too :)
Kate's doing the recorder too ... starting to string some notes together with about the right sound and timing on occasion.
Maeve does the gymnastics too now. She started doing it on the side whenever dropping or collecting Kate.
The first week she was cross because she said they all said she was the smallest.
We had to leave her down gently and explain she was the smallest (by at least a half a head).
 The others were all lifting her up too.
 She's accepted/forgotten it now "someone has to be the smallest".
  She's great in school, tells us lots about it.
  Her best friend is a Lily too.

Wednesday, 14 October 2009

Cystic fibrosis and digital scrapbooking:

Adele's been busy. Cystic fibrosis and digital scrapbooking: 

AES stick-tutor guide and Cryptonomicon and jwz and duct tape

AES guide. This is lovely. In the style of http://www.xkcd.org/

Fits in, I'm reading Cryptonomicon at the moment (fantastic by the way).

I'm doing some duct-tape scripting myself these days, and we made a kayak from cardboard and duct tape :)
jwz the Duct-tape programmer
about:config in firefox, also about:plugins 
in exploder About -> System Info 

tcl quoting/arg seperation and calling vmrun.exe with tcl and vmware installtools for QNX

Some material to take note of in case you get bitten by tcl arg separation/quoting.

TCL Quoting/Arg seperation
I had a big argument with a bit of a tcl script when calling vmrun.exe
using exec. We could also call it using expect spawn but similar arg
seperation and quoting/slashifying issues arise. 

Executive summary:

#this works:
set res [exec ls -al .]; puts stdout $res;

# this doesn't: couldn't execute "ls -al .": no such file or directory
set cmd "ls -al ."; set res [exec $cmd ]; puts stdout $res;

# this doesn't: /usr/bin/ls: invalid option -- 

set cmd "ls"; set args "-al ."; set res [exec $cmd $args]; puts stdout


This explains it nicely:
"exec   doesn't use
a shell." Exec is a Tcl command. Exec expects its arguments as separate
More explaination there and linked in.

So this works (but the story is more complicated if args itself has
arguments with spaces/quotes/funny chars like [] {} \/):
set cmd "ls"; set args "-al ."; set res [eval exec $cmd $args]; puts
stdout $res;
# to store part of command to run and combine it later 

More useful reading on the quoting and passing of args to exec in tcl:

"Q.B16- How can I get quoted strings to work the way I want?"

The title there is "exec quotes problem" which is misleading because it
is an args seperation problem not a quoting/slashifying problem.

Calling vmrun from exec with tcl 
Here is the detail on how this arg seperation problem affects the
internals of our vmrun::run

In bash:

VMAUTHFLAGS="-T server -h https://192.168.xx.xx/sdk -u root -p aseekret
-gu root -gp ''"
vmrun $VMAUTHFLAGS list
vmrun $VMAUTHFLAGS listRegisteredVM

In tcl, all arguments hardcoded on the exec line works easily:
$ tclsh84
set res [exec "C:\\Program Files\\VMware\\VMware VIX\\vmrun.exe" -T
server -h https://192.168.xx.xx/sdk -u root -p ahhnon -gu root -gp ''
puts stdout $res

Total running VMs: 3
[datastore1 (1)] integration-datastore/VM 2/QNX_641_.vmx
[datastore1 (1)] integration-datastore/VM 1/QNX_641_.vmx
[datastore1 (1)] integration-datastore/VM 3/QNX_641_.vmx

Or instead of quoting and slashifying slashes and spaces you can use {}
which prevents further interpretation. But also note that tcl exec has
special quoting rules for windows.

set res [exec {C:\Program Files\VMware\VMware VIX\vmrun.exe} -T server
-h https://192.168.xx.xx/sdk -u root -p atishoo -gu root -gp '' "list"
In TclTestManager library Common/vmrun.tcl

We want set up vmrun.exe path and arguments from config one time. 
Provides basic functions:


Example of use in TestVmrun.tcl
source [file dirname [info script]]/packages.tcl 
package require "vmrun"

set sResult [vmrun::run [list listRegisteredVM]]
puts "listRegisteredVM: $sResult"

# note that {} are used to prevent [] expanding datastore as a command
set sVMID {[standard] Test_QNX641_/QNX_641_.vmx}

# note that one arg which is a list is passed to vmrun::run
set sResult [vmrun::run [list start \{$sVMID\} ]]
puts "start VM: $sResult"

set sResult [vmrun::run [list listDirectoryInGuest \{$sVMID\} "."]]
puts "btl list dir in VM: $sResult"

set sResult [vmrun::run [list listProcessesInGuest \"$sVMID\"]]
puts "btl list processes in VM: $sResult" 

set sResult [vmrun::run [list runScriptInGuest \"$sVMID\" ifconfig]]
puts "btl runScript in VM: $sResult" 

In vmrun::init these are done (loaded from config):

set vmrun::vmauthflags "-T server -h https://192.168.xx.xx/sdk -u root
-p blessyou -gu root -gp ''" 

set vmrun::vmrun_path "C:\\Program Files\\VMware\\VMware VIX\\vmrun.exe"


Inside vmrun::run this is done:

proc vmrun::run { lCmd } {
# put all args into one string
   # all args = (vmauthflags + vmrun command and args in lCmd) 
   # if there are quotes/spaces in the items in the list they are preserved

   set aArgs1 $vmrun::vmauthflags
   set aArgs2 [join $lCmd " "]
   set aArgsAll "$aArgs1 $aArgs2"

   # quote the vmrun.exe command with {} to prevent interpretation the first time
   return [eval exec {$vmrun::vmrun_path} $aArgsAll]

Awkward things: 
 *         The need to seperate args into tcl args in exec call
 *         at vmrun::run call our args are be tcl interpreted and inside
the vmrun::run call the args are tcl interpreted again on the exec line
 *         vmrun.exe path has spaces in it
 *         []'s in vmid (tcl evaluates anything inside [] as a command
unless surrounded by {})

Conclusion: Tcl is a very very interpreted language. In all languages
you run into cases where quoting and slashifying becomes a bit tricky
especially when wrapping up strings to send to e.g. Database or
command-line or xml. In interpreted languages you have an extra level of
interpretation to deal with already and more levels are introduced as
you have the power to wrap up commands to multiple levels within your

Vmware installtools and QNX
Vmware installtools are needed for the vmrun commands which interact
with the running VM. These are easily available for linux/windows but
not so easy for QNX.

So most of the code talking to running VMs will probably telnet into
host (using expect) (double telnet in cases where VM is not on wider


"command-line versions for a subset of the VMware Tools linked on his
website http://chitchat.at.infoseek.co.jp/vmware for Some additional
guest Oss."

"There was a QNX port but web site seems to be having problems.



# VMware installtools for QNX: 
# vm must be started, but "unknown error" 
# In VM/sdk  Commands - Configure VM - Power - "VMware Tools Scripts"
are checked ... but.
# In                                 - Advanced - Configuration Params
vmware.tools.installstate is none
# Found it, 
# "VMware Tools is not supported on this guest OS.HelpOKCheck the
virtual machine's configuration to make sure the settings match the
installed operating system. Consult the documentation for more details
about supported guest operating systems."
# vmware tools are available for some versions of qnx ...
#  http://www.openqnx.com/downloads/projects/qnx-vmware/
# but we don't want an install dependancy ... if we can help it.
#set sResult [vmrun::run [list installtools \{$sVMID\} ]]
#puts "btl installtools VM: $sResult"
# uname -> qnx 6.4.1 ...
#  also http://chitchat.at.infoseek.co.jp/vmware/vmtools.html#top
alternate vmware tools
#  and open vm tools (by vmware)
# on dependant commands if we wait long enough we get:
# "Error: The VMware Tools are not running in the virtual machine:
[standard] Test_QNX641_/QNX_641_.vmx"

notes on how to run cron and locatedb windows

Also cruise control was gebrokened (after windows update reboot it was not started).
I had accessed it one day before it went broken so I thought I was doing something wrong. Quick google shows on windows JavaService wrapper can be used to install it as windows service. Hmmm. I wonder could cygrunsrv do that.
2 builds after it is reenabled someone breaks the build! :) Good timing :)

$ cygrunsrv -I cron -p /usr/sbin/cron -a -D
$ cygrunsrv -L

$ net start cron
The cron service is starting.
The cron service was started successfully.

$ cygrunsrv -Q cron
Service             : cron
Current State       : Running
Controls Accepted   : Stop
Command             : /usr/sbin/cron -D

$ crontab -e
44 4 * * * "/cygdrive/c/Documents and
Settings/user/bin"/run_updatedb_intune.sh 2> /dev/null
55 9 * * * echo "james cron test" > /tmp/jamesCronTest.txt
# at 4:44am daily

$ export EDITOR=vi
$ cat ~/bin/run_updatedb_intune.sh 

updatedb  --prunepaths='/proc /cygdrive/c/program_disk/cygwin
 /cygdrive/h '

# /cygdrive/s is share
# u is user
# h is home (software/...)
# r is read-only svn

Sunday, 4 October 2009

motorbike seat leather repair - John Tallaght

I got my motorbike seat leather repaired and Stan's seat too.
Done in one day. 60 euros each.
 Very fast :) Good job. 
John in Kilnamanagh in Tallaght. 1 Pine Tree Crescent.
Liam in LME Motorcycles (01) 2830195 passed on John's number to me.

Before Pics (sorry no after pic yet!):

The 1911 Irish Census for Ashgrove, Cobh, Co. Cork.

The 1911 Irish Census has been digitized.
Interesting to take a look, census for Ashgrove, Cobh, Co. Cork.

4648 Colemans and 1346 Callans:

Ashgrove, Queenstown, Co. Cork:
Parlimentary Division: East Cork
District Electoral Division (DED): Queenstown (No. 1 Rural)
Townland: Ashgrove
Barony: Barrymore
Parish: Templerobin

Enumerator's abstract (Form N)
http://www.census.nationalarchives.ie/reels/nai001905101/ (totals)
House and Building Return (Form B1)
http://www.census.nationalarchives.ie/reels/nai001905103/ (totals)
Out-Offices and Farm-Steadings Return (Form B2)
http://www.census.nationalarchives.ie/reels/nai001905105/ (nothing much)

Patrick Byrt Constable

10 houses. Rooms: 2 2 2 2 3 6 3 1 2 2.
Outhouses &c: 3 2 2 1 24 0 0 0 0 8

Cunningham's Walsh's Connell's own their own place. Beamish is landholder of the rest. Walsh's is house thatch.

All houses Roman Catholic except Beamishes, Hawkins the Coachman and one of the Grooms.


Household Return (Form A) forms:

House 1, Cunningham's - Mary a widow 61 and son and daughter Patrick and Mary 34 and 31.

House 2, Walsh's - Farmer David and Margety 66 and 45 and 7 kids from 21 to 3 years old. 2 boys and 5 girls.

House 3, Jeremiah and Catherine Sullivan. Herdsman. 36 and 34 and 3 small kids 5, 3 and 0 John, Patrick and Mary.

House 4, Burke's - Gardener David and Abina Burke 36 and 37, 2 sons and 3 daughters 11 8 5 3 and 1. William Ellen Margaret Abina and John.

House 5, Patrick and Johanna Shea 51 and 45. Bailiff. And two sons David and William 9 and 5.

House 6, The big house. Beamish's. Terrible handwriting! :)
Beamish and wife and 2 visitors (Clutterbuck) in 60s. 7 female servants. All protestant except Molly Donovan the kitchen maid.

House 7, Hawkins. Coachman. + wife 42 and 40 and 3 sons 14 12 and 9

House 8, 2 grooms men Richard Barry and William Whiteside, both single. Barry Catholic and Whiteside Protestant (born Armagh).

House 9, William and Mary McGrath. Ages 40. Farm Labourer (as well as 2 eldest sons). William born Cork. Mary and kids all born waterford. Kids from 19 to 5, 5 sons and 2 daughters.

House 10, Connell - Farmer 57 and wife 56, 3 daughters 19 17 and 14 (of 8 children all still living).

Book (kids or adult) title: Two Weeks with the Queen author: Morris Gleitzman

title: Two Weeks with the Queen
author: Morris Gleitzman
A book Kate had home from school. Daire and Fionn read it too.

Colin gets a lovely pair of new shoes for Christmas but he wishes he got a microscope that he asked for. His younger brother Luke got what he wanted. A toy MiG jet fighter. Luke gets sick and he has cancer. Colin is packed off to England to stay with relatives. He doesn't want to go but looks on this as a good opportunity to find the very best doctor that will be able to cure Luke.

Colin proves indominatable. He tries direct tactics first and keeps on going even when efforts to meet with the Queen and eminent doctors are not successful. He makes some friends and gives and receives help. Very very funny and also a very touching story.


http://en.wikipedia.org/wiki/Mikoyan MiG