Being productive the Mac way.

June 1st, 2009

Consider two notebooks. A MacBook and a PC.

If you are working on a presentation and for some reason must get up and do something else you’ll be doing the following: save the document, close the notebook, do what you want to do, open the notebook and hope it haven’t crashed.

If you however are working on a Mac you’ll be just closing and opening it.

CSS Naked Day ‘09

April 7th, 2009

What’s going on, where are all images and colors?

Once again the time has come to take my clothes off. As in last year I’ll be participating once again in the CSS Naked Day initiative.

What is CSS?

CSS stands for Cascading Style Sheets. According to Wikipedia CSS is “used to describe the presentation (that is, the look and formatting) of a document written in a markup language“. Simply put CSS is the shackle in the web technologies stack that makes web sites and applications look as what they look like.

And what’s the initiative about?

The purpose of the initiative is to move web developers to use the right tool for the right job, ergo to use CSS for styling and (X)HTML (the markup language in the web) for describing data. So, yes, it’s a web developer’s initiative aimed at web developers. Drop me a line or a tweet if you want more detailed information about this matter.

Notes on Ubuntu

January 25th, 2009

I had to reinstall my Ubuntu Intrepid last week. This post is a note to myself to save me some time googling some not-so-intuitive configuration next time I happen to install Ubuntu. I’ll update the post occasionally when I figure out fixing a problem. But be aware that those are configurations to my needs and I won’t be explaining much what is what.

Brother MFC 215C

I’ve already documented this issue in a separate post last time I’ve installed Ubuntu.

VirtualBox and USB


sudo adduser $USER vboxusers # add current user to the vboxusers group
cat /etc/group | grep vboxusers # get the ID of the vboxusers group
sudo gedit /etc/fstab & # edit file system information

And append these lines:


#usbfs for virtualbox
none /proc/bus/usb usbfs devgid=ID_of_vboxusers_group,devmode=774 0 0

First Day of the Week

I don’t get this. The KDE calendar applet offers a configurable option to select the first day of the week. Gnome’s doesn’t. Why? Anyway the locale has to be changed.


sudo gedit /usr/share/i18n/locales/en_US # or whatever locale you're using

Change first_weekday 1 to first_weekday 2 to set Monday as the first day of the week.


sudo dpkg-reconfigure locales

Log out and than back in.

Backspace Behaviour in Firefox


about:config
browser.backspace_Action = 2

[via]

Or strangely enough, Kubuntu needs a zero!


about:config
browser.backspace_Action = 0

[via]

Google Gears and Mozilla Prism

  1. Download latest Gears for Linux from http://dl.google.com/gears/current/gears-linux-opt.xpi;
  2. Rename *.xpi to *.zip;
  3. Extract the archive;
  4. Edit install.rdf with a text editor;
  5. Change

    <em:targetApplication>
    <Description>
    <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
    <em:minVersion>1.5</em:minVersion>
    <em:maxVersion>3.0.*</em:maxVersion>
    </Description>
    </em:targetApplication>

    to


    <em:targetApplication>
    <Description>
    <em:id>prism@developer.mozilla.org</em:id>
    <em:minVersion>0.1.*</em:minVersion>
    <em:maxVersion>10.0.*</em:maxVersion>
    </Description>
    </em:targetApplication>

  6. Compress files;
  7. Rename *.zip to *.xpi;
  8. Install.

[via], copying steps here in case the other site goes down.

Webmontag in Frankfurt

December 5th, 2008

Anfang dieser Woche fand der letzte Webmontag für dieses Jahr statt. Ich war dabei. Ich suche bereits seit mehreren Monaten Bar Camps oder ähnlichen Veranstaltungen im Raum Frankfurt, leider bis jetzt immer vergeblich. Na ja, vielleicht war ich ja auch bei der Suche nicht so fleißig ;)

Mein Eindruck? Es hat mir sehr gefallen. Es hat viel Spaß gemacht, auch wenn ich ein Frischling in der Szene bin. Die Atmosphäre war sehr locker und alle haben sich von vorne rein geduzt. Das half mir natürlich sehr, um mich schneller zu entspannen. Der andere Trick war, sofort zu den Rauchern zu gehen. Da gingen die Gespräche sofort los. Na, wer sagt’s denn? Rauchen ist immer noch sozial, auch wenn es vom Gesundheitsministerium als asoziale und uncoole Angewohnheit propagandiert wird :) .

Mir gefiel aber nicht, dass es nach den Vorträgen keine Q&A-Session gab. Nicht dass ich mich bei meinem ersten Event getraut hätte, Fragen zu stellen, aber immerhin ich hatte einige. Beim Networking nachher hat mir aber Thorsten verraten, dass es gezielt so ist, weil der Webmontag an einem breiteren Publikumskreis ausgerichtet ist und nicht etwa nur an Techies. Das sei auch der Grund, weswegen in keins der Vorträgen technische Details dran kamen. Dafür aber gibt es ein anderes Event, dass wohl nur für Techies: DevDusk. Es findet demnächst in Januar. :thumbsup:

Sonst hat mir der Vortrag von Darren sehr gut gefallen. Er ist nicht nur ein unterhaltsamer Sprecher, sondern hat auch ein interessantes Projekt vorgestellt: tellagain, das leider anscheinend noch im closed alpha ist. Allerdings hatte ich die Möglichkeit beim Networking ein bisschen mit ihm zu chatten, ob ich eventuell mit meinen bulgarischen Kenntnissen helfen könnte. Ich muss aber noch schauen, wie ich das ganze bei mir persönlich organisiere, ich habe sehr viel am Kopf. Ach, übrigens, verkauft denn jemand Zeit? Ich brauche dringend einiges, so ca. zwei bis drei Wochen, bin bereit sogar einen überhöhten Preis zu zahlen …

Also, wir sehen uns nochmals im Januar auf dem DevDusk. Und am nächsten Montag, den. 08.12, findet die girl geek dinner. Männer sind da auch herzlich eingeladen, müssen aber in Begleitung von mindestens einer Frau erscheinen.

P.S. Mein erster Posting auf Deutsch. Stößchen.

Brother MFC 215C on Ubuntu

November 8th, 2008

Here is a step-by-step guide of how to install the Brother MFC 215C on Ubuntu 8.10. I’ve used only official Brother documentation, which is quite extensive. Feel free to read it, this is just a summary and a note to myself.

Actually Ubuntu 8.10 recognizes the printer but it fails to even print a test page. First we need to remove the printer. In order to so, go to the CUPS web frontend and remove the printer.

Before the installation we need to set some things up. Run those commands in a terminal window. If your curious what they do, read the man pages.


sudo aa-complain cupsd # log cups to syslog
sudo mkdir /usr/share/cups/model # mkdir
sudo mkdir /var/spool/lpd #mkdir
sudo apt-get install csh # install the C-Shell
sudo apt-get install sane-utils # install scanning utilities

Now we can begin with the driver installation. You need those files, obtainable at Brother’s web site.


brmfcfaxcups-1.0.0-1.i386.deb # fax capabilities
brscan2-0.2.4-0.i386.deb # scanner driver
brscan-skey-0.2.1-1.i386.deb # enabled printers buttons
cupswrapperMFC210C-1.0.2-3.i386.deb # cupswrapper driver, deb package
mfc210clpr-1.0.2-1.i386.deb # lpr driver, deb package

Now fire up a terminal and run those commands.


sudo dpkg -i --force-all --force-architecture mfc210clpr-1.0.2-1.i386.deb # install the lpr driver
sudo dpkg -i --force-all --force-architecture cupswrapperMFC210C-1.0.2-3.i386.deb # install the cupswrapper

You can now check if both drivers were installed successfully using


dpkg -l | grep Brother

If you don’t see both drivers installed, review the log produced by the install procedure, check for errors and fix them.

Go once again to CUPS’ web interface and check if the URI of the printer is


usb://Brother/MFC-215C

If it isn’t you’ll need to to edit the printer and select proper driver and device. Now print a test page. You’re ready.

Let’s move now onto the scanner. First install the driver and review the install log for errors. Unfortunately the scanner will be available only for superuser. We have to fix this.


sudo dpkg -i --force-all brscan2-0.2.4-0.i386.deb # install driver
dpkg -l | grep Brother # check installation
sudo nano /etc/udev/rules.d/40-basic-permissions.rules # open permissions for editing

Find those lines and replace them - MODE is changed form 0664 to 0666, thus enabling usage by limited users. Afterwards you need to restart the system.


Before the edit---------------------------------
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"

After the edit----------------------------------
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"
SUBSYSTEM=="usb_device", MODE="0666"

We now want to set up device the buttons and add the service as a startup programm.


sudo dpkg -i –force-all brscan-skey-0.2.1-1.i386.deb # install driver
dpkg -l | grep Brother # check installation
System -> Prefrences -> Sessions

Unfortunately I get errors when running the scan tool in the console, that I haven’t been able to fix yet. But scanning via the device button still works. The error is:


ERROR : Semaphore error (not owner)22

Last one left to install is the fax capability. Unfortunately my MFC isn’t connected to a telephone line, so it’s rather pointless to install the fax capabilities and not being able to test them. The official documentation is rather good, not perfect but still usable, so if you need the fax refer to it.

One thing that I wonder about is why installing the printer on Linux is such major PITA. This haven’t changed for the last two years. HP printers are so much easier to get up and running under Linux …

Solving Google Reader’s i18n Issue

August 18th, 2008

For some weird reason after my vacation my Reader wasn’t any more in English but in German. I’ve tried switching my settings to English and this helped. Only it didn’t switched the interface language of the application, only of the settings view. It felt really weird using Reader in German :).

Here is how I’ve solved the issue:

  1. remove http://www.google.com from Google Gears trusted sites: Tools -> Google Gears Settings
  2. emtpy the cache: Tools -> Clear Private Data
  3. reload the Reader

And it worked :). Reader’s interface is once again in English.

Bad Usability vs. Goog Usability

July 23rd, 2008

Bad Usability

Representing the destructive option as big shinny button, representing the desired option, in most cases at least, as a smallish link.

bad usability

Good Usability

Asking for a confirmation on critical and irreversible operations.

good usability

Re: Dustin’s Brain Teaser

July 10th, 2008

I’m a bit late, but rather later then never :). I just didn’t had even 10 Minutes spare time in the last few days.

Here is my response to Dustin’s brain teaser. I’m offering a solution without regular expressions. Though after reading the problem I first thought “Nice, I’ll use regular expressions.”. But then I realized that now I’m facing two problems :). I’m really not that good at regexps.
But I promise I’ll keep the teaser in mind and one day I’ll solve it with regular expressions.

var teaserNoRegExp = function() {
  var input = ['a', 'b', 'c', 'c', 'd','e', 'e','e', 'e',
'e', 'f', 'e', 'f', 'e','f', 'a', 'a', 'a', 'f', 'f', 'f'];
  var output = '';

  // assume Array.prototype.forEach

  var spanOpened = false;
  input.forEach(function(el, index, input){
    if (input[index-1] == el && input[index-2] == el && !spanOpened) {
      output = output + '';
      spanOpened = true;
    }
    output = output + ' ' + el;
    if (input[index+1] != el && spanOpened) {
      output = output + '';
      spanOpened = false;
    }
  });
  document.getElementById('result').value = output;
};

P.S. It actually took me a minute or two to write it down.