Technology

Scriblio Theater

Flickr Video Flickr Video

I should have done screencasts like the above long ago. It’s not that they’re great, but they are a wonderful excuse to use the canned lounge music I’ve got. Those videos are now on the front page of the official Scriblio site, and I did five more to demo the installation and configuration. Big thanks go to Collingswood NJ Public Library Director Brett Bonfield who let me use his library like this.

Scriblio 2.7 Released

My slides for my presentation yesterday at code4lib are available both as a 2.7MB QuickTime and a 7.8 MB PDF, while the gist of talk went something like this: Scriblio is an open source WordPress plugin that adds the ability to search, browse, and create structured data to the the popular blog/content management platform. And […] » about 500 words

Is Internet Linking Legal?

You’d think the top search results on the matter would be newer than 1999, but that’s where you’ll find this NYT article and PubLaw item story, both from precambrian times. Worse, both of those articles suggest that my links to them may not be entirely kosher.

The problem is probably that US courts have not spoken clearly on such a case. A Danish court in 2006 did, but I think that no case in the US has gone far enough to actually set a precedent. Another chance at settling this issue was lost earlier this month when BlockShopper settled, rather than continue a costly defense of such a case. The EFF is confident BlockShopper could have won, but that means little when the legal bills come in.

Related at EFF: Kelly v. Arriba Soft and Unlawful Internet Gambling Enforcement Act.

Matching Multi-line Regex in BBEdit

I love BBEdit on my Mac, but I was left scratching my head again today when I was trying to remember how to make its regex engine match a pattern across multiple lines. My hope was to extract a list of initial articles from a page that had HTML like this:

<table>
  <tr>
    <td valign="top" colspan="34" align="left">
      am
    </td>
    <td valign="top" colspan="10" align="left">
      Scottish Gaelic
    </td>
  </tr>
</table>

<table>
  <tr>
    <td valign="top" colspan="34" align="left">
      an
    </td>
    <td valign="top" colspan="10" align="left">
      English,
    </td>
    <td valign="top" colspan="10" align="left">
      Irish,
    </td>
    <td valign="top" colspan="10" align="left">
      Scots,
    </td>
    <td valign="top" colspan="10" align="left">
      Scottish Gaelic,
    </td>
    <td valign="top" colspan="10" align="left">
      Yiddish
    </td>
  </tr>
</table>

<table>
  <tr>
    <td valign="top" colspan="34" align="left">
      an t-
    </td>
    <td valign="top" colspan="10" align="left">
      Irish,
    </td>
    <td valign="top" colspan="10" align="left">
      Scottish Gaelic
    </td>
  </tr>
</table>

Indeed, it has well over 100 tables like that, and I was looking for the contents of the first TD in each. The following regex does it:

(?s)[^<]*<table>[^<]*<tr>[^<]*<td[^>]*>([^<]*)</td>.*?</table>

The most significant part of this is the (?s) at the beginning that tells BBEdit to match the pattern across line breaks. A more ninja-like regex assassin would probably be able to do it better, but this worked.

Oh Noes! My Table Is Gone!

# mysqlcheck -p -A --auto-repair --optimize
wp_1_options
info     : Found block with too small length at 17732; Skipped
info     : Wrong block with wrong total length starting at 17776
info     : Found block with too small length at 28776; Skipped
warning  : Number of rows changed from 444 to 441
status   : OK

Cleaning up the mess after a hardware failure can suck. This mysqlcheck output is from the wp_options table for this blog. Unfortunately, if the options table is unreadable, all of WordPress panics and fails to load.

No Such Thing As Bad Publicity

Finding a 2007 blog post about a condom and a cheeseburger made a friend ask if student blogs should be moved off-domain. My flippant answer was “There’s no such thing as bad publicity.” His retort was simple and quick: “Tell that to the catholic church.” It stung. He had me, I was sure. It’s hard […] » about 300 words

Gaming: Pac-Txt

Richard Moore’s Pac-Txt is even more brilliant than his Paper Pong (which, ironically, you can play online).

Here’s a transcript of my best Pac-Txt game to date:

Pac-Txt!
--------
You awaken in a large complex, slightly disoriented. Glowing dots hover mouth level near you in every direction. Off in the distance you hear the faint howling of what you can only imagine must be some sort of ghost or several ghosts.

> go east
Huh?!

> look
You are in a long corridor. You may go forward or backward and there are glowing dots in every direction. There is a glowing dot hovering near you. 

> eat
You have eaten the glowing dot!

> go forward
Huh?!

> forward
You have moved.

> look
You are at an intersection. You may go forward, backward or right and there are glowing dots forward and right. There is a glowing dot hovering near you. 

> eat
You have eaten another glowing dot!

> check score
Huh?!

Looking Back At Mac Hardware Performance

I recently replaced the Mac Mini I use to host my web development with a PowerMac G4. (Story: the Mini was mine, a personal purchase I made to support my work on Scriblio and other WordPress-related projects, but recent changes in our network and firewall policy made the machine inaccessible from off-campus without using the […] » about 200 words

Some Predictions Come True

Way back in 2002 Dave Winer made a bet:

In a Google search of five keywords or phrases representing the top five news stories of 2007, weblogs will rank higher than the New York Times’ Web site.

It’s important to remember that in 2002 people still wrote “weblogs” in quotes, as though they weren’t sure how to use the word. Winer won his bet in 2007. Anybody want to make a bet about 2014?

Will Time Warner Cable Customers Be Able To Watch Nickelodeon In The Morning (or Visit Nick.com)?

This dispute is going on now, tonight. There are obviously at least two sides to this story (Viacom &Time Warner Cable). You’d think a media giant like Viacom would know how to handle this one, but it seems that all they’ve got is that splash screen in front of a bunch of their websites and […] » about 200 words

Plugin Options Pages in WordPress 2.7

WordPress 2.7 requires that plugins explicitly white list their options using a couple new functions. WordPress MU has required this security measure for a while, and it’s nice to see an evolved form of it brought to the core code. [Migrating Plugins and Themes to 2.7][1] article in the codex offers some guidance, but here’s how it works:

First, register each option for your plugin during the admin_init action:

``` function myplugin_admin_init(){ register_setting( 'my-options-group', 'my-option-name-1', 'absint' ); register_setting( 'my-options-group', 'my-option-name-2', 'wp_filter_nohtml_kses' ); } add_action( 'admin_init', 'myplugin_admin_init' ); ```

In the example above, the value for my-option-name-1 will be filtered by absint before being saved to the options table. my-option-name-2 will be stripped of any HTML by wp_filter_nohtml_kses.

Then build a form like this prototype:

```
      </td>
    </tr>
  </table>
</div>

Easy.

 [1]: http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7#Plugins "Migrating Plugins and Themes to 2.7 « WordPress Codex"

MySQL 5.1 Released, Community Takes Stock

MySQL 5.1 is out as a GA release, but with crashing bugs that should give likely users pause. Perhaps worse, the problems are blamed on essential breakdowns in the project management: “We have changed the release model so that instead of focusing on quality and features our release is now defined by timeliness and features. Quality is not regarded to be that important.”

Still, people are finding inspiration in OurDelta and Drizzle. Competition from those braches/forks and criticism from the community are sure to help re-align the MySQL core, or provide a reasonable alternative if Sun/MySQL can’t deliver. In the meanwhile, the High Availability MySQL blog is worth following.

Longwell RDF Browser

Longwell mixes the flexibility of the RDF data model with the effectiveness of the faceted browsing UI paradigm and enables you to visualize and browse any arbitrarely complex RDF dataset, allowing you to build a user-friendly web site out of your data within minutes and without requiring any code at all.

Demos

Real Data Architecture: Stockholm Data Cave

Need a retro-looking bomb shelter for your server, or are you a big fan of the Cheyenne Mountain scenes in WarGames? The Bahnhof Pionen White Mountains hosting facility is a cave below Stockholm. You’d expect the sysadmin blogs to call it fit for a James Bond villain, but even the architecture blogs are a gaga. […] » about 100 words