The Simpsons Mocks Apple. Soooo excellent and so right on. I *love* the Simpsons. Edit: 2 hours laters, the video are taken down, obviously:) (2) «
Hofstadter’s Law: “It always takes longer than you expect, even when you take Hofstadter’s Law into account.“. Seems to apply to just anything:) (1) «

Working with SVN on Windows is pretty much synonym to using TortoiseSVN I guess. If you are running a trunk version of WordPress, maintaining plugins or doing anything else collaboratively, chances are you're using this nice piece of software.

When you log to you computer to get some coding work done, what is your first task? If "I manually update several SVN repositories", the following is for you. TortoiseSVN has command line support that, even on Windows, can make things easier.

Create a batch file, name it like updateSVN.bat, and paste:

  1. @echo off
  2. FOR %%A IN (
  3.     "E:\home\ozh\wordpress\"
  4.     "E:\svn\someplugin\"
  5.     "E:\svn\someproject\"
  6. ) DO START TortoiseProc.exe /command:update /path:%%A /closeonend:0

A few comments:

  • The "FOR %%A" loop will contain, obviously, paths to the projects you want to update.
  • The "START" bit means "start asynchronously, ie don't wait for end of previous task to launch next one" so that all the Update windows will pop up simultaneously.
  • the "/closeonend:0" means, you guessed, "don't close the Update window once it's done", so you can actually see what has been updated.

There you go. You can even put this .bat file in your startup folder to get things updated when you turn your computer on.

Why I get to my computer in the morning, especially if I'm a little tired, I like to spend the first minutes doing something that will, like, concentrate the Universe's energy in my body before I can get any work done. Or something like this :)

Sometimes it's just listening quite loud to one particular song (lately it's been mostly Eric Johnson's Cliffs of Dover, yeah, as heard in Guitar Hero 3:)

But my favorite "morning energizing routine" over the last years has been, definitely, watching Matt "Where the Hell is Matt" Harding's dancing videos around the world, especially the latest one. This one gets me smiling to tears, literally.

Do you have any mind fueling or refueling techniques?

A WordPress plugin that would let everybody log in as 'admin'… sounds stupid, right?

It might, but this is what I really needed. When I'm testing something under different browsers, I hate it when I have to login multiple times (once with MSIE, once with Firefox…) to view the same admin page. So, basically, No Login makes your admin backend a free-for-all no-login area. For localhost test sites only, obviously.

Achievement of the week-end: finally did beat Slash in Guitar Hero 3 duel, Hard level. AH! :) (5) «

I find most online advertising from little to very annoying, but I admit I somehow like those 125×125 pixel banners and always pay attention to them on other websites. I've been wanting to play with these banners for quite some time now, but never really spent the few minutes to do so.

I've applied to Buy Sell Ads, got approved (so I guess they're accepting roughly anyone) and here they are, the cute little square banners. This may be a temporary experiment, mostly out of curiosity. We'll see.

Anyway, for the first month and to celebrate this pixel intrusion in my sidebar, banners are $5 dollars a month (yeah, couldn't make them cheaper, that's the bottom price enforced by BSA:) There are only 4 available so get your spot quick!

There's a very handy new function and feature in the upcoming WordPress 2.7: the favorite actions, showing a nice little drop down menu containing quick links to your, well, favorite tasks.

By default, this drop down contains a link to "Add New Post", "Add New Page" and "Manage Comments". Hopefully and as usual, it's very easy to customize this menu and to add (or to remove) elements.

Concept

The new function that draws this drop down box is the well named favorite_actions() which calls a similarly named filter. This filter wants you to play with an array with the following structure: array( url => array ( title, level ) ). For instance and by default, the links are drawn by the following array:

  1. $actions = array(
  2.     'post-new.php' => array(__('Add New Post'), 'edit_posts'),
  3.     'page-new.php' => array(__('Add New Page'), 'edit_pages'),
  4.     'edit-comments.php' => array(__('Manage Comments'), 'moderate_comments')
  5. );

The 'level' parameter (here, 'edit_pages' or 'moderate_comments') is described and explained on the Codex: Roles and Capabilities.

Play with the filter

Now, let's modify the array, using the appropriate filter. All you need is to create a custom function that returns an array with the same structure as above.

For instance, the following plugin would remove the link to "Add new page" from the favorite actions, and add a link to a fictional plugin:

  1. <?php
  2. /*
  3. Plugin Name: Sample Favorite Actions
  4. Plugin URI: http://planetozh.com/blog/
  5. Description: Example plugin showing how to modify the favorite actions
  6. Author: Ozh
  7. Author URI: http://planetozh.com/
  8. */
  9.  
  10. add_filter('favorite_actions', 'ozh_sample_fav');
  11.  
  12. function ozh_sample_fav($actions) {
  13.     // remove the "Add new page" link
  14.     unset($actions&#91;'page-new.php']);
  15.     // add quick link to our favorite plugin
  16.     $actions&#91;'admin.php?page=blah/blah.php'] = array('Some plugin', 'manage_options');
  17.     return $actions;
  18. }
  19.  
  20. ?>

(Or, get this file: sample_favorite_actions.php and rename as .php before playing with it)

Pushing further : plugin idea

Since this menu is called "favorite actions", it would be really cool to populate it with your true favorite ones. A plugin could rather easily monitor what admin pages are called and their frequency, and modify the drop down menu accordingly.

Anyone fancy to code it?

I've just noticed this (new, I guess) kind of warning on Gmail: "this account is currently being used in 1 other location at this IP"

This is a welcome feature. I really wished Gmail would add more paranoid and security related notes and items like this one. I (most of us?) have most of their online and offline life summarized in Gmail and I always have in mind scary stories like this one.