Ricky Moorhouse

Blog

Load CSV data into MySQL

load data local infile 'export.csv' into table table_name fields terminated by ',' enclosed by '"' lines terminated by 'n' (field_list)

Abii monster

A-b-i-i

Abi drew me this monster: Her name is A-b-i-i and she is 5. She is mad because she is sick.

My graze snacks arrived!

My graze box arrived just before lunch and looked fantastic.  I've had the pineapple and that was delicious and very juicy - looking forward to eating the rest of the box later!

If you want to try it for yourself, you can get your first box free.

700 chocolate bars

What defines you?

Blessed is the man
,
who walks not in the counsel of the wicked,
nor stands in the way of sinners,
nor sits in the seat of scoffers;
but his delight is in the law of the Lord,
and on his law he meditates day and night.

Psalm 1:1-2 (ESV)

To be blessed is to know God's favour and experience true happiness. This blessing comes from taking counsel from God rather than from those who have rejected his counsel, the wicked. It's important to know whose advice and counsel you are following and whether it is rooted in God or in human sin and rebellion.

Jesus has taken our sin on himself through his death on the cross so now we have a new identity in him. Therefore we should stand out from the world rather than blending in with the sin that surrounds us. As Philippians 2:14-16 says, we should contrast so much from the world around us that we shine like stars in the darkness. Is your life defined by your sin or your Saviour?

We all find our delight in something and have things that bring us joy and these are what shape our life. Where does your joy come from - do you delight in God's word or in your sin?

Do you delight in reading and meditating on God's word and dedicate time to it, implanting it into your heart and mind?

Useful SQL

update [table_name] set [field_name] = replace([field_name], '[string_to_find]', '[string_to_replace]');

Replace within a field

New desk layout

Google Calendar to Twitter

For our Momentum men's events we have a Google Calendar that we use to manage the upcoming events, and this gets pulled into our website using the Wordpress plugin ICSCalendar. Recently I set up a twitter account as well, and decided that it would be useful to provide reminders of events on there, which people could then follow and receive SMS updates for.

Initially I had a look around to see what I could find, and came across Calendar Tweet, but that didn't do quite what I was looking for. Then I remembered smtp2web.com, which you can send e-mails to and it will post them to your website over http. So I set up our gmail account to forward the event reminders to my smtp2web e-mail address and built a PHP script to receive the content, parse it and send a nicely formatted message to twitter.

So I can now set up e-mail reminders for the events in Google Calendar:

and they will automatically get posted on twitter at the right time:

Update: The PHP Code used is available at http://gist.github.com/280986/

Guilty Conscience

One of Abi's favorite games recently has been to pretend to be on the telephone, having a conversation with someone and then pass the phone around saying "I'll just pass you over to Daddy". Today when she passed the phone over to me, we had the following conversation:

Me (talking on the toy phone):

Hello?

Really?

Why did she do that?

Abi (protesting profusely):

I didn't!

Watch out for the Abirazzi

Abirazzi