The Linux Page

Help other users realize that everything is possible, especially avoiding Windows for their own personal use.

Welcome to The Linux Page


Fox Trot by Bill Amend. Click to enlarge.
Click to enlarge

This site is a collection of my own work with Linux. Certain things are easy, others take time to decipher and if I ever need to repeat the work (which usually happens!), then I need to remember everything by memory or... have a site with all the steps taken and to take again.

The following are my most recent posts:

I use the Cassandra database cluster system to manage a new set of websites and once in a while I start getting many errors and the website stops working altogether.

When that happens, it is likely that Cassandra broke something in the temporary tables that it holds. The only way to go past that problem is to clear those tables. Until then, it will fail over and over again (they really would need some euristic to auto-clean up even if it means that you're losing some data.)

The command to repair the database, really quick, is as follow:

nodetool scrub snap_websites files

Note that ...

Today I noticed many errors on one of my websites. Looking closer into it, I noticed that the code for the mo_references Drupal module stopped working.

It took me some time, especially because the code seemed to work just fine as all the files could easily be displayed.

Actually, that was not the case. The unpack() character 'a', which I used, was transformed from a simple string that gets trimmed, to all the characters, including the NULL characters. Ouch! Now we have to use the 'Z' character instead.

I use it to unpack() a tar file by loading 512 bytes of data in a ...

Foggy error reports when dealing with #PCDATA in a DTD.

If you are like me and write DTDs to check your XML files to make sure you don't have too many mistakes in them, then you probably have had this problem before.

The #PCDATA has a very special behavior and it is really restrained as follow:

  • #PCDATA must appear at the start
  • #PCDATA must be repeated from zero to infinity, so only * work with it
  • #PCDATA cannot be used with sub-groups (things between parenthesis)

Something like this:

<!ELEMENT Z (P | (#PCDATA | A | B | C)* | Q)+>

does not work because you use + and #PCDATA is within a sub-group.

What you ...

As we are working on a new website, we had a problem where a redirect would not work. I tried both: a simple Redirect and a RedirectMatch as follow:

Redirect / http://finball.m2osw.com/
RedirectMatch permanent ^(.*)$ http://finball.m2osw.com$1

Both of these entries would not work at all.

I verified, to make sure, that the alias module was turned on. It was.

ls -l /var/apache2/mods-enabled

This did list the alias.conf and alias.load entries as expected.

So? What else?

Well... This was installed on a new server and we left the default entry in there:

ls -l ...

Today I got a new video card because it looks like the old one I had was going bad. I hope that was not my KVM, although we'll see when it gets hot again, whether the video goes bouncy again or not... If not, then the old card is good for the trash (although it works in console mode just fine!)

So I got a new card. My old one was a NVidia GT 220. Fairly old model. Yes.

The new card is an NVidia GT 630 (to be precise: Asus GT630-SL-2GD3-L.)

When I tried to start X11, I saw an error (really quick) and the system did not come up. Looking closer into the matter, I could see that the NVidia ...

I use gVim all the time, I like that editor very much (emacs is just way too much, if you ask me.)

But once in a while I install a new server and by default they generally turn off the modeline feature. This is because there are potential security risks in link with that feature (i.e. vim starts running whatever script is defined in the text files that you edit...)

Anyway, I most often forget about the command to enable my:

vim: <setup>

(I most often define the tab stops, corresponding shift width and eventually the syntax of a file.)

Only, on those new servers, that doesn't ...

As I am developing a set of pages for a customer, I ran in an intersting problem: my JavaScript function could not properly define the sizes of a box.

That box is heavily tweaked with the CSS assigned to it, as well as all of its neighbors. So I thought that may have something to do with it.

What I hadn't realized so far is that the ready() function of jQuery() is called once the script that includes it is ready (as in loaded) and not once the document as a whole is ready (done loading, i.e. onload event.)

With that knowledge it was easy to understand that I was actually finding myself ...

Basics

I got a cross over CAT6 cable and somehow the computers on which I used it do not like it...

So I thought maybe it was not a valid crossover cable. After all, it would not be the first time I buy some hardware which is not exactly what it was advertised as being.

The following are a few pictures that give us the answer, though. You have to look for the colors of the wires in the RJ45. It's not very easy to see, but it is different enough (assuming you are not color blind... sorry if you are, you probably will have to test with a device or a battery and an LED or light bulb) ...

I wanted to dynamically manage the attributes of the HTML tag. As I'm working on the Snap! C++ system, I thought that should be done with the standard XSLT feature: <xsl:attribute-set name="...">. Unfortunately the the XQuery implementation does not currently support such, at all.

There is a way, though, to still make it work with a central template definition which can be used to decide what should be and what should not be added to the HTML tag.  Especially, in this way we can make use of one template that is a system defined template. This being said, if you use ...

As I work in consoles every now and then, I run in that one problem:

Some text is written in Dark Blue over the Black background:

This is a good example of what I'm talking about.

And if you can read that text, wow! (without selecting it first.

So... how could you change the color of that blue to make it readable? There is a way by sending some escape command to the console:

echo -e "\\e]R\\e]PC6495ed"

That command changes the color of the blue to a light blue (somewhat "cyan", although not light cyan.)

The "\\e]R" part is to reset the colors to ...

Unfreeze your Mouse when it Froze

Thank you for visiting my website.