World IPv6 Day

So I’m a bit late to the party, but who cares in the end.

As of today, well, 15minutes ago, This hostname is IPv6 enabled.

C:\Users\DD32>tracert -6

Tracing route to [2402:9400:1000:2::8e]
over a maximum of 30 hops:

1 53 ms 51 ms 52 ms 2001:44b8:61::220
2 52 ms 258 ms 265 ms [2001:44b8:8060:8000::1]
3 51 ms * 50 ms [2001:44b8:8060:12::1]
4 51 ms 51 ms 51 ms [2001:7fa:c::3]
5 73 ms 74 ms 74 ms [2402:7800:0:1::55]
6 75 ms 73 ms 73 ms 2001:44b8:b060:4::4826:1
7 74 ms 74 ms 74 ms 2402:7800:0:3::6
8 73 ms 75 ms 86 ms 2402:9400:1000:2::8e

What does it mean to most of you? Absolutely nothing, to the rest of you? Well, It shows that I’m a computer geek :)

World IPV6 day:
Am I using IPv6?:

svn blame output format

>svn blame
  7131       ryan                   GNU GENERAL PUBLIC LICENSE
  7131       ryan                      Version 2, June 1991
  7131       ryan
 10085       matt  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
 15668     scribu  51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 10085       matt
  7131       ryan  Everyone is permitted to copy and distribute verbatim copies
  7131       ryan  of this license document, but changing it is not allowed.
  7131       ryan

So, Most of have seen that, and a few of us have had a need to parse it now and then.. Googling for an answer never seems to bring up a reasonable answer either.. So here you have it, an explanation of the output format of SVN Blame.

Honestly, It’s quite simple, it’s just fixed width columns, with a twist, by default the columns are 6 characters wide, but will expand to fit the largest revision ID, or the longest committers username. The author’s field is followed by a single space, and then, the line data.

Why go to the trouble of this? Well, It comes back to the fact that although it looked like fixed width.. it couldn’t just be fixed width.. and what rules are behind it? I checked the source of svn blame and this comment was what I wanted to know how the fixed width was selected:

  /* The standard column width for the revision number is 6 characters.
     If the revision number can potentially be larger (i.e. if the end_revnum
     is larger than 1000000), we increase the column width as needed. */

Updated Regular expression: (Original had a bug where it didn’t handle empty lines in the file)

preg_match_all('!^\s*(?P<revision>\d+)\s+(?P<author>.+?)( (?P<data>.*))?$!m',
 $output_from_svn_blame, $matches, PREG_SET_ORDER);

Example output:

 0 =>
 'revision' => string '7131' (length=4)
 'author' => string 'ryan' (length=4)
 'data' => string ' Version 2, June 1991' (length=41)
 1 =>
 'revision' => string '7131' (length=4)
 'author' => string 'ryan' (length=4)
 'data' => string '' (length=0)
 2 =>
 'revision' => string '10085' (length=4)
 'author' => string 'matt' (length=4)
 'data' => string ' Copyright (C) 1989, 1991 Free Software Foundation, Inc.' (length=56)

It’s probably not the most efficient, but it does the job for what I needed for now. Also note, I’ve removed the numeric keys from the example output there (preg_match returns both named and numeric results in the array set)

Disable plugin update notification for a specific plugin in WordPress 3.1

Just  quick sniplet of code to drop into a plugin file to disable plugin update notifications.

The reason i’ve written this is a plugin which has been heavily modified has a update, and, wanted to stop hearing about it; Sure, I could’ve just changed the name, but this felt more Politically Correct (and isn’t that what we’re all supposed to do!?)

So, The code:

add_filter('site_transient_update_plugins', 'dd_remove_update_nag');
function dd_remove_update_nag($value) {
 unset($value->response[ plugin_basename(__FILE__) ]);
 return $value;

Have fun, and happy Hacking!