Movember day 25

We’re within a whisker of the finish now. Here come the bros:

Movember day 25

I can’t speak for the other chaps, but mine feels like its stabilised a bit now. But stabilised in a state where it itches like mad and looks absolutely terrible. Surely only the addition of bad aviators from Boots could make me look any more of a fool.

We’ve started debating shave off times and tactics already. The general consensus is that the 1st of December is when they’ve got to go. Rich seems keenest to ditch, asserting that “12.01am monday night/tuesday morning” is when his ‘tache meets its maker.

The mo bros will be converging in London for the first all-White-October-Mo-Bro-meetup tomorrow. As well as admiring each others mos and parading them proudly around the city, we’ll also be doing some kind of secret activity (I would imagine we’ll be blogging more about that here or somewhere else once we know what on earth is going on…).

Oh, and here’s another one of those mo over time videos that we’re still working on. Here are my first 20 days:

If you’ve been following along but haven’t yet donated, now’s the time:

https://www.movember.com/uk/donate/your-details/team_id/13289/

And stay tuned for the big mo finale in 5 days…

Simple shorten url using bit.ly and php

Inspired by the simple tweet to twitter function by Fabian Potencier I have built a stupidly simple url shorter for bit.ly. Something you are probably going to want to do if you are sending tweets via PHP.

function shorten($url, $login, $apikey)
{
  $api_url = "http://api.bit.ly/shorten?version=2.0.1&
                    longUrl=".urlencode($url)."&login=".$login."&
                    apiKey=".$apikey;
  $ret = file_get_contents($api_url);
  $data = json_decode($ret);
  if($data instanceof stdClass && property_exists($data, "errorCode") && $data->errorCode==0)
  {
    foreach($data->results as $result)
    {
      if(isset($result->shortUrl))
      {
        return $result->shortUrl;
      }
    }
  }
  return $url;
}

In the application where I am using this function I have defined the login name and api key as constants, so you can do away with 2 function calls.

Also handily it returns the original url if bit.ly fails.

Movember day 20

So we’re past half way, the end is in sight and the mo bros are looking pretty bad-ass.

20-days-blog

There’s been some discussion over the gap in the middle of some of our mos. Most notably mine. Apparently it’s a known style but I think it’s just rubbish. Maybe I should refer to what is surely the best mustache reference found so far: The Complete Ukulele Guide to the Moustaches of the World.

We’re getting more comfortable out and about now, striding forth with our mos thust proudly aloft. Dave even took his to a multi-Michelin starred restaurant where, as it turned out, it was right at home.

And some mo themed merchandise arrived at White October Towers this week. The favourite has to be the “White Movember Flocked ‘Mo’ Shirt” (that’s a mighty long URL) with its beautiful textured velvety mos. Mmm.

So, with only 10 days to go until “the big mo”, now is the perfect time to sponsor us if you haven’t already:

https://www.movember.com/uk/donate/your-details/team_id/13289/

And don’t forget to join in with the Movember, Mo Madness playlist fun. It’s the craze that’s quite literally not sweeping the nation.

The Movember playlist

Yes, we’re behind with the Movember updates. The halfway stage has come and gone so I think you’ll have to wait until tomorrow (day 20) for the latest mo-bro pics.

But to keep you in the mo mood, why not start Spotify up and join in with the Movember playlist madness?

The idea is simple – find some tunes that either have “oh”, “no” or “know” in them. They should be catchy singalong numbers (for reasons which will become clear). Add the tunes to the playlist. Now, as you’re playing the awesome movember playlist, you should sing along but replace “oh”, “no” or “know” with “mo”. That’s it.

Here’s the linky: spotify:user:bouncingdan:playlist:5S4xtGeYYGRK1UKXo3wWM3

Join in and enjoy. Obviously I reserve the right to autocratically throw non-catchy or off-message songs off the playlist. Or shut the whole thing down if it descends into farce / abuse.

Slave out of sync with your master?

Hello, I am not growing a Mo. So I have to blog about something technical…

One of our major clients has a Master-Replication setup which we use for failover and backups. However it managed to get itself out of sync. A small example is that it the user table is missing a single user. The database is so large it is impossible to be sure that this is the only thing missing.

Thankfully there are tools to help in this situation provided by Maatkit, sadly the documentation is a bit vague and lacks direct examples.

Here are my simple steps to get a slave in sync with its master. I would make sure that try this is a demo environment first as during my experiments with these tools it managed to remove data from the master…which is bad!

Make sure that replication is working before you start this.

1) In the database (mydb) on the master I want to create the following table, this stores the checksum data:

CREATE TABLE checksum (
     db         char(64)     NOT NULL,
     tbl        char(64)     NOT NULL,
     chunk      int          NOT NULL,
     boundaries char(100)    NOT NULL,
     this_crc   char(40)     NOT NULL,
     this_cnt   int          NOT NULL,
     master_crc char(40)         NULL,
     master_cnt int              NULL,
     ts         timestamp    NOT NULL,
     PRIMARY KEY (db, tbl, chunk)
);

2) On the master run the following command, which stores the checksum data in the table we just created:

mk-table-checksum -d mydb --replicate mydb.checksum 127.0.0.1

3) On the slave run the following command, what this does…I am a touch vague about but it works…read the docs see if you can explain it:

mk-table-sync -d mydb --replicate mydb.checksum --sync-to-master --no-foreign-key-checks --execute 127.0.0.1

I hope that this is of some use to someone!

Movember Day 10 (belatedly)

There’s no doubt about it, things are starting to get serious for the Mo Bros as we approach the halfway stage.

Movember day 10

Dave (El Muchacho) is still looking pretty mean. But Ed (Spurlock) is clearly hot on his heels for the title of The Baddest (i.e. waaay goodest) Mo. Rich needs reintroducing to his razor and I feel as though I really ought to try to prise my finger away from my chin in these photos.

There are signs that we may be feeling the strain of a mo in public:

Tweet from Rich

Tweet from Ed

Tweet from Dan

Even though I’ve arguably got the least impressive mo, I’ve notched up more sponsorship than everyone else (I think donor error may be a factor here, alas). Go me! But however it gets here, we should be proud to have raised more than £200 so far. Thanks and keep it coming people:

https://www.movember.com/uk/donate/your-details/team_id/13289/

Come back in five days for the next mo update…

Movember Day 5

It’s day 5 and the Mo Bros are looking, well, shifty:

Movember day 5

Dave is clearly way out in front with a mo that is shaping up to be South America in style.  Ed is overdue a shave, but has informed us that he’s aiming for ‘The Trucker’. Rich assures us that he’s also going to bite the bullet, have a shave and go for full on mo-in-progress humiliation. Flattering (read terrible) lighting makes me look as though I have no mo at all.

For a taster of the mustache growth timelapse video extravaganza that Dave has planned, take a look at his first test video:

Meanwhile our team donations are looking healthier than our mos, frankly. Thanks to everyone who has donated so far. If you’re enjoying laughing at our efforts but  you haven’t donated yet, then please do so right here:

https://www.movember.com/uk/donate/your-details/team_id/13289/

The White October Mo-bros line up for the start of Movember

Shuffling nervously in front of cameras held at arm’s length, the clean-shaven White October Movember (now there’s  a mouthful) team members prepare to slowly lose all dignity over the space of the next month. Yes, we’re growing ‘Mos’ for charity.

No-mo-bros!

We’ll keep you updated here with all the top lip hair growth news and pics you never really wanted.  And in exchange for the opportunity to giggle at our efforts, all we ask is that you sponsor us some of your hard earned in aid of the worthy cause of The Prostate Cancer Charity.

So get on it and sponsor us. We’ll love you forever. Or at least until we’ve had a shave on the 1st of December.

https://www.movember.com/uk/donate/your-details/team_id/13289/