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:

Lists are most of the time used to create menus. These menus can easily be shown vertically on one side or another of your website.

Now, most of the time, you will want to have one or two menus showing horizontally (like the top menu on this site, although that one is very specific to the Cute menu module.)

If you are reading this, you probably already know how to create such menus. The HTML code looks like this:

<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>

Note that sub-menu items are possible too, ...

I use Drupal for most of my sites. I use it in many different ways and it has been working real good for me.

On one of the sites, I use the ThemeKey module to select a different theme once you are logged in. This means, when I want to switch themes, that one theme selected for logged in users sticks, whether you disable it or not, it remains selected by the system.

And?

Well... one thing sticks from themes, their .info file. You just cannot refresh the cache properly unless you disable the theme, then re-enable it. (By the way, when disabled, don't go to the Blocks administration screen ...

I always have had problems with the <p> tag in HTML.

Now, I was happy to find the solution to a problem I hit several times and finally solved with a big smile.

In most cases I use <div> (division) tags to create web pages. That's easy because those don't generally use any padding or margin. So you build all sorts of complex tree with that and the result is just perfect.

[toc hidden:1]

Yesterday I had a customer sending me emails from a different account from last time. That different account is a Yahoo! account so in general there is no problems with that.

Yet, this one time it did not make it. One of my email filters failed. Namely, the DKIM filter. It uses the dkim library to check mail messages and make sure that they indeed originate from where they say they are from.

It is an interesting concept. In the following figure I show the standard scenario of a hacker sending me spam and a valid domain sending me an email:

As you can see, if I communicate with the ...

My Raspberry Pi fits in my hand and runs Linux.

Yes.

I have been around a lot of people and there are many who heard of Linux but to not know how to pronounce that word. I never thought it was complicated, that's a latin word, right?

So... maybe it is not "Lie neex"... Think about the "i" later and see how Italians, Spanish and French people pronounce it... Yes! The right way! You got it!

Anyway... for those in doubt, there is a file you can listen to Linus Torvalds himself, he's the one who named that OS, after all, so he should know how to say it. Enjoy!

Since December 2008, I have noticed that many RSS feeds include invalid ampersand characters. XML has a very specific way to handle the ampersand character, you have to write &amp; and not just &. Although it is similar in HTML, in XML it is actually enforced.

This is neat, it ensures that your files are really valid.

[toc hide:1]

Somehow, once in a while, I just don't get my navigation menu at the top of my screen.

I use the Drupal SimpleMenu module. It works in most cases, yet you have to make sure that your theme include the print $closure before the closing body tag. Something like this:

    ...
    <?php print $closure; ?>
  </body>
</html>

This will print the simplemenu variable. It is a Javascript variable used to create the menu. It is an array tree with all the menus and sub-menus and their corresponding label and URL. Simple stuff... The author uses SuperFish to get everything ...

One of the annoying thing with Subversion (SVN) is that at times it will add a execute flags to your files and there does not seem to be a function to easily remove that execute flag.

Doing a chmod on your file and trying an update, status or commit does not work. One way is to (1) copy your file, (2) delete the file from your SVN, (3) re-add the file after you carefully changeed the mode with a "chmod 644" or something similar. But of course, that means you lose your history...

[toc hide:1]

See attachment at the bottom for sample code that fails in different versions of PHP 5.2.x

Today a customer told me that his pages disappeared on his Drupal site.

I looked into it and after a few hours determined that a module was the cause. Then I looked in the module and the only part I could see that could possibly be wrong was the preg_replace_callback() call.

So I got the input data from one of my customer pages and run the PCRE against it in an interactive version of PHP. That gave me the same result: nothing.

The expression started with (?:<p.*?>)?\[ and it used the /s ...

When you use a PostgreSQL database, it gets vacuumed every night (by default on most systems, verify on yours, it may not be the case...) This is a quite simple process to make sure that the database remains fast. And it works great, also. You can have millions of entries and it remains very fast (they have real good algorithms to auto-generate index files as required by your repetitive queries.)

The problem is that tables are being grown for 24h and then they get cleaned up. They can then grow again for 24h. If you don't clean up, the tables continue to grow, fast. Up to the point where ...

Unfreeze your Mouse when it Froze

Thank you for visiting my website.