Friday, February 05, 2010

Where I’d like to live

I hear people around here saying house prices in Brixton will boom in the next few years as (The Council expects) the area to become the next Notting Hill.

Maybe that would be a good time to sell up and move?
I have lived in Brixton since the late 70’s, the place I grew to love has already changed beyond recognition.

So, where do I want to live?

  • no more than 10 minutes walk from the sea
  • but at least 30m above sea-level (thats not a flood plain)
  • within 5 minutes walk of the shops
  • in easy reach of a public swimming pool
  • in a place I don’t need to have a car
  • good public transport
  • at least semi-rural
  • in a building that is efficient enough not to need heating
  • with a workshop
  • with very fast broadband
  • where I can play loud music
  • where there is good cultural diversity
  • with a good local pub
  • and a few nice restaurants

Where am I going to find this combination?
Am I asking too much?

I have most of these already, apart from the efficient building and rural/coastal location.

I had better start looking …

Thursday, February 04, 2010

Best Mail.app Tip Yet

The best tip I read for a while on MacOSXHints.com was this one :

Select your “Inbox" and “Sent" mailbox at the same time, then turn on threading.

(you get a view of them both interleaved, even better than the GMail “All Mail” view)

Tuesday, November 24, 2009

External Drives on MacOSX

Another one of my external hard drives has failed, after only two years. I was very lucky not to loose important data!!

So here is my latest bug report to Apple.
I post it here because I do not expect a response from them, maybe one of my readers has an idea if there is a simple solution.


My hard drives connected to Apple equipment are wearing out faster than they need to.

When I have external hard drives connected to my mac via FireWire, I like to let them spin down to reduce noise and energy usage, however every single time I do something like go to save a file, all of the drives spin up, one by one. All activity on the machine is blocked during this and is very frustrating, specially when I did not need to access any of the external drives. It makes more sense IMHO to only spin up a drive if it is actually selected (in the Open/Save dialog).

This problem is causing unnecessary delays in the system and extra wear and tear on the drives.

To try to mitigate this problem, I moved one of my external drives to the USB connection on my TimeCapsule. Now another issues rises.

With the external TimeCapsule drive unmounted, every time the TimeCapsule is accessed via a computer on my network to perform a backup, the external drive spins up, then immediately spins down again!!

This is completely pointless and causes even more noise, delays and wear on the drive.

Monday, November 23, 2009

Compiling Asterisk 1.4.27 on MacOSX

Asterisk is a powerful Open Source telephony toolkit.
The latest version 1.4.27 does not compile on MacOSX 10.6, due to missing libraries.

The solution is simple and slightly strange as this bug was fixed 3 years ago :-/

In the file “Makefile” locate line 360 :

+@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)” $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all

and replace it with this :

+@_ASTCFLAGS="$(OTHER_SUBDIR_CFLAGS) $(_ASTCFLAGS)" AUDIO_LIBS="$(AUDIO_LIBS)" $(MAKE) --no-builtin-rules -C $@ SUBDIR=$@ all

Now at least it compiles on my system :-)

Sunday, November 22, 2009

A good winter meal

Channa Saag Aloo
(produces 4 or 5 servings)

Ingredients

2 tins of chick peas
1 lb spinach
3 potatoes
1 onion
4 cloves of garlic
1 green pepper
2 tomatoes
1 tsp turmeric
2 tsp ground coriander
2 tsp ground cumin
1 tsp black mustard seeds
1 tsp ground black pepper
salt to taste
green chillies to taste (try at least 4)
olive oil and/or butter (or ghee if you are really serious)

Preparation

Halve then coarsely slice the onion
Thinly slice the garlic
Remove seeds, cube the green pepper
Slice the chillis
Cube the potatoes (1 inch cubes are a good size)
Peel and dice the tomatoes (pour boiling water over the toms to make peeling easier)
Wash and tear up the spinach a bit
Drain and rinse the chickpeas

In your biggest pot, ideally with a thick base and a lid :

Warm the olive oil and/or butter (I mix them, butter has a good flavour, adding olive oil helps stop it burning)
Add the dry spices to the oil, keep on a low heat, when you hear the mustard seeds popping (a few minutes) add the onions and garlic and coat them in spices
Let the onions soften and begin to brown, stir often
Add the green pepper and chillis, let them soften, stir often
Add the tomatoes, let them develop a sauce, stir often
Add the potatoes, coat them in the sauce for a few minutes
Add a cup of water (enough so the potatoes are nearly covered), put the lid on, let it simmer on a low heat until the potatoes are nearly cooked, stir often
Add the chick peas, coat them in sauce, simmer gently for a few minutes, stir often
Add the spinach and salt, put the lid on, leave it on a low heat
When the spinach wilts, give it a good stir and you are ready to serve as soon as the potatoes are done

Serve with rice, pitta bread or wholewheat toast, mmmmm

enjoy !!

Friday, May 22, 2009

My Latest Hint

I just had this hint posted on MacOSXHints.com.

On my last project, I was collaborating with people in the States via iChat, using audio, video screen and document sharing.
We had such wide-ranging and complex discussions, I kept wishing I could record them.

Ironically, it was not until after the work ended that I found the iChat / Video / Record menu item (aarrgghh!!).

Well anyway, I thought it would be useful to automate the recording feature and wrote the script featured in MacOSX Hints.

You can attach this script to specific buddies, or to everyone. When an AV Chat starts, recording is automatically started ..... well actually the other party is first asked if they mind and can choose to reject the request.

It seems that only the person who initiates, records, so if both parties want a recording they both have to start it.

Many thanks to Ross and Dave for help testing :-)

Wednesday, May 20, 2009

Logging to GTalk

I was reading yesterday that Apple is thought to be using XMPP the Jabber protocol for their new iPhone Push Notification technology.

That's funny I thought, I had just started using XMPP for logging!!!

I am experimenting with Asterisk at the moment. Asterisk for those that do not know is an Open Source PBX (Private Branch Exchange) a phone system in software. I have it running on my ancient 500 Mhz Mac Cube, it has been extremely reliable. My home office now has a ridiculously sophisticated phone system ;-)

IMHO most of the monitoring tools for Asterisk suck. They are written in nasty languages like PHP, Perl, Flash etc. that not only do I not want on my system, they are overkill.

What I wanted was to receive simple messages about the run-time status of the system. I wanted to be able to receive these messages securely, from wherever I was (because I can use my phone system from wherever I am, but more on that another time).

Asterisk has a Jabber module, so this was an easy way to go.

So, I have two GMail Accounts, one for personal email, one for mailing lists.
I have iChat on my desktop/laptop/iPhone already subscribed to GTalk on my personal GMail account.

First I added my spare GTalk account as a buddy to my personal account (requires some fiddling around, but if you know your IM client, it's pretty easy).

Then I configured Asterisk (beware, she's a complex beast, BTW a semi-colon marks a comment).

First configure /etc/asterisk/jabber.conf :
[general]
debug=yes ;Turn on debugging by default.
autoprune=no ;Auto remove users from buddy list.
autoregister=no ;do not auto register users from buddy list.

[gtalk-logger] ;label
type=client ;Client or Component connection
serverhost=talk.google.com
username=MY_SPARE_GTALK_USERNAME@gmail.com/asterisk ;Username with optional roster.
secret=************** ;Password for MY_SPARE_GTALK_USERNAME
port=5222 ;Port to use defaults to 5222
usetls=yes ;Use tls or not
usesasl=yes ;Use sasl or not
buddy=MY_MAIN_GTALK_USERNAME@gmail.com ;Manual addition of buddy to list.
statusmessage=Up and Running ;custom status message for Asterisk.
timeout=100 ;Timeout on the message stack.


This allows Asterisk to connect to GTalk to send messages.

The next thing to do is to emit messages from the appropriate parts of your dialplan.

First I defined a Macro, that can be used from anywhere in the dialplan, this goes in /etc/asterisk/extensions.conf :

[macro-logger]
; log message - to Jabber
; @param ${ARG1} - the message to send
exten => s,,Jabbersend(gtalk-logger,MY_MAIN_GTALK_USERNAME@gmail.com,${STRFTIME(${EPOCH},GMT,%C%y-%m-%d %H:%M%n)} ${ARG1})


This sends the message in $ARG1 with a timestamp.

Next is to use the macro from the dialplan. Here is an example of an outbound route to go via SipBroker, matching dialed numbers beginning with * :
[via-sipbroker]
exten => _*X.,1,Macro(logger,Outbound call to ${EXTEN} via SipBroker) ; log the call
exten => _*X.,2,Set(CALLERID(all)=${JQNAME} <${JQOFFICE}>) ; Set outbound CallerID
exten => _*X.,3,ChanIsAvail(SIP/${EXTEN}@sipbroker,j) ; Check to see if available (jumps to priority + 101 on fail)
exten => _*X.,4,Dial(SIP/${EXTEN}@sipbroker,,tTW) ; Dial, allowing transferring and recording
exten => _*X.,5,Macro(dial-result) ; Check result
exten => _*X.,104,Playback(all-circuits-busy-now) ; if ChanIsAvail fails, say message


I know, it looks really weird !!!! :-)

I left out a few details like, looking up the phone number in my AddressBook.app to show the recipient's name and using Growl.app to splash these messages received by iChat. I plan to cover these in a subsequent post.

I have found this to be a really simple and reliable solution.

There are XMPP libraries for many systems, I may start using this technique elsewhere as well.