Tag: tip

  • WordPress config snippet for dynamic domains

    Quite why this isn’t how WordPress works by default, I’ll probably never know.

    $domain = 'http' . (false ? 's' : '') . '://' . $_SERVER['HTTP_HOST'];
    define( 'WP_SITEURL', $domain );
    define( 'WP_HOME', $domain );

    If anything, this snippet is for my own reference.

    Prevents redirects on development / staging sites without changing the wp-config.php

  • Google Sheets Formula – show an age from a DOB

    I couldn’t find a decent formula to show an age from a Date Of Birth, so I wrote this:

    =CONCAT(FLOOR((TODAY() - B2)/365),CONCAT("y ",CONCAT(FLOOR((((TODAY() - B2)/365) - FLOOR(((TODAY() - B2)/365))) * 12), "m")))

    Shows an age in years and months; e.g. “10y 6m”.

  • IE7 Tip – Reload

    IE7 Tip - ReloadWhen IE7 was designed they took the peculiar decision to split the navigation buttons into three places (if you include the home button).

    If you find yourself up in the top left wanting to reload, just click the drop-down button and select the current page (will be highlighted and have a tick-mark on the left), as shown in the picture.

    Bizarrely and unfortunately, this only works if you’re not looking at the last page in your navigation history for this tab. This suggests that it’s only through poor programming logic that it works at all.

    [tags]IE,IE7,Microsoft,tip,tips,browser,flaw,bug[/tags]

  • Firefox Tip

    I discovered yesterday that [tag]bookmarks[/tag] in [tag]Firefox[/tag] can have no name.

    Seems pointless? Not if the sites have [tag]favicons[/tag]:

    Firefox Bookmark Favicons

    Space saving, so you can see more, hence fewer clicks.

    The above are jazzle.co.uk, The Sketchup Components Collection, bit-tech, ebay, amazon, radiotimes.com and the default icon (for a site with no [tag]favicon[/tag]), but you knew that of course since you recognise the sites’ icons.