Archive for the ‘in English’ tag
CSS Naked Day ‘09
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
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
- Download latest Gears for Linux from
http://dl.google.com/gears/current/gears-linux-opt.xpi; - Rename
*.xpito*.zip; - Extract the archive;
- Edit
install.rdfwith a text editor; - 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> - Compress files;
- Rename
*.zipto*.xpi; - Install.
[via], copying steps here in case the other site goes down.
Brother MFC 215C on Ubuntu
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
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:
- remove
http://www.google.comfrom Google Gears trusted sites:Tools -> Google Gears Settings - emtpy the cache:
Tools -> Clear Private Data - reload the Reader
And it worked :). Reader’s interface is once again in English.
Bad Usability vs. Goog Usability
Bad Usability
Representing the destructive option as big shinny button, representing the desired option, in most cases at least, as a smallish link.
Good Usability
Asking for a confirmation on critical and irreversible operations.
Re: Dustin’s Brain Teaser
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 + '<span>';
-
spanOpened = true;
-
}
-
output = output + ' ' + el;
-
if (input[index+1] != el && spanOpened) {
-
output = output + '</span>';
-
spanOpened = false;
-
}
-
});
-
document.getElementById('result').value = output;
-
};
P.S. It actually took me a minute or two to write it down.
nofollow Bookmarklet
Here is a smallish bookmarklet that highlights all links that are marked with the nofollow attribute. Just drag and drop it to your bookmarks bar.
In its current version the bookmarklet is very very simple: it just highlights nofollow-links and reports back the total number. However it only works on frameless documents.
Here’s the code in a readable <code>-block:
-
javascript:(function(){
-
for (var i = 0, a = document.getElementsByTagName('a'), b = a.length, c = b; i < b; i++) {
-
a[i].rel.match(/nofollow/i) ? a[i].style.backgroundColor = '#ff0066' : c–;
-
}
-
alert(c);
-
})();
That’s the shortest I could get. Have fun :).
P.S. You can test-drive it right away on this page: the about-link in the footer is a nofollow-link.
P.P.S. It’s the browser that turns a double minus into a single long dash.
about: WP2.5 and Technorati
I’ve just finished (hopefully) migrating all of my content to WP2.5. It took me 10 long repetitive hours.
I’ve been running WordPress 2.2 for a long time. About two weeks ago the new polished version has been brought into light. It looks nice, but it has its flows and stupidness.
Over the last year I’ve tried many times to update my blog version to a newer one, but every single time the update procedure threw up some not so funny errors like ‘Table wp_comments doesn’t exists.. Other two or three tables were also missing. Wah? Wtf? Why haven’t you guys tested update.php? How the fuck do you deploy? Absolutely no content showed up.
So, I was stuck with the old version. Anyway, this wasn’t bothering me at all, I can hack-fix any imaginable vulnerability myself, no worries here.
But Technorati just knocked me down the other day - they are discontinuing indexing older versions of WordPress. Wow! That’s a very hostile move, guys. I don’t care at all about you but I wouldn’t be surprised if other similar services also abandon older versions of blogging or cms’ing software. So 20% to 30% of my traffic would be lost. I had to update.
It took me circa 10 hours to copy/paste my content. Thank you WordPress for the 5 minutes install and for the several hours getting up and running. Maybe next time instead of crafting [gallery] you could spend some time testing and ensuring all your scripts run.
Exposed
I’ll be participating in this year’s naked day on 9th of April.
Yeah, I’m a nudist, baby. I’ll be running the whole day with my clothes off and I’ll be exposing myself all over the place. I’m so excited I’ll do the long 48-hours-day striptease.
Cheers.
about: X-UA-Compatible, Take 3
I’m so happy about the great news today that I don’t know what to say … :) :)
Official anouncment and some people’s reactions.
I welcome this decision and applaud it. It really shows Microsoft’s efforts towards openness and interoperability. This news just might turn my personal image of Microsoft from evil to good.
Hey bartender, let me get a beer for Chris Wilson, Bill Gates and all the great guys and girls from the web development community that helped with this issue.



