Blog - Guillaume Déflache

To content | To menu | To search

2008-08-02 A.D.

amendable and free online dictionary

Since I moved to German-speaking Switzerland, I sometimes need to get Standard German translations of French words, or the opposite. After some tinkering I settled on using...

Continue reading...

2008-03-11 A.D.

quit Javascript "alert debugging"

Avoiding the alert function for debug traces in Javascript is so simple, I never figured it out until now:

function debug(s) {
    if (! window.info_guillaume_d_console) {
        window.info_guillaume_d_console =
         window.open("about:blank","info.guillaume-d.console");
    }
    info_guillaume_d_console.document.write("<p>"+s+"</p>");
}

There are probably many issues with this but... anyway, for now it serves me well as Firebug's console.debug("foo") does not work for me in Firefox 3 Beta 3 (it prints OK but disappear once the whole page is loaded...), and this method beats "alert debugging" any time!

Update: Fortunately the above bug does not show up in Firefox 3 Beta 4 anymore (with unchanged Firebug 1.1.0beta10)!

2008-02-26 A.D.

Tip: FTP-upload hidden dotfiles on OSX

As you probably know showing normally-hidden dotfiles in the Finder is painful, as (as far as I know) it still requires a Finder restart.

While doing some programming on my website recently I had to change Apache's .htaccess files quite often and upload them to a FTP site (which is my only access route to my website).

For this instead of reverting to using a text-mode FTP program I found the following method more practical:

  • open your favorite, drag-and-drop capable FTP application and connect to the FTP site you want to upload dotfiles to
  • open Terminal, type open /path/to/your/.file, this will open a window for your dotfile
  • each time you want to reupload your dotfile, drag the icon in the title bar of the dotfile window to the window listing the remote FTP directory contents... and drop it! You're done! :)