Syndicate content

list

SANE cannot find any scanners

As I upgrade to 13.10 of Ubuntu, I'm having to do work to get my system back to normal...

Today I stumble on the fact that USB ports are now not accessible by everyone by default. So when I tried to scan a document, it told me that I had no scanner. Panic... and then I found out that the permissions were changed, widely, so only users who are root (by default) can access the scanner.

I changed the group to a group I'm in and it worked without having to reboot or relog in. However, it is not unlikely that the group won't stick... TBD!

To find the USB port that has your scanner, ...

Asymmetric Routing—reply via the correct Ethernet connection

I've been looking around every now and then to try to understand how I could create a server that replies on the correct Ethernet port.

The idea is simple, we have very powerful servers that can handle many requests, more requests that one Ethernet port can handle. In other words, we could have 2, 3, 4, probably even 10 Ethernet connections (it really depends on your application, of course: how much RAM you need, how much processing is necessary for each access, etc.)

The solution is to use the ip command line which allows us to add default gateways for each ethernet card based on the ...

Your Bookmarks are auto-backed up in SeaMonkey! (and maybe FireFox?)

I started the stock SeaMonkey browser by mistake as my Unity icons disappeared (i.e. seamonkey as is on my command line started /usr/bin/seamonkey which is not the correct version!) This had several bad side effects. For of all, it destroyed my bookmarks (argh!) and then it decided to install the 64bit Flash plugin. That did not work well since the version I like is a 32bit version.

Once I had the correct version started again, each time it was trying to open a Flash animation, it would be "stuck" for a few minutes, until I tried to open a page with a movie in a Flash shell. That ...

meld -- advanced graphical diff utility

I use subversion and once in a while I have a rather large number of changes to check in. In most cases I can just do svn diff and be done with it. But today I have changes in quite many files (12, I know, it's not that much, but still... when you're by yourself on a project...) and some of the changes were quite large.

To have something better than svn diff, I looked into the different graphical diff tools available a little while ago and I installed meld. I think that's the best I can find under Linux at this point. In my situation I can simply open the SVN diff in the current ...

Getting Ubuntu to playback DVDs

In order to playback a DVD you need to make use of commercial encryptions (also called codecs.) Actually Ubuntu calls them "non-free". The reality is these are patented and protected so people cannot just ripoff a DVD. Which is not true at all since pretty much any computer can play DVDs and thus can copy all the data. Anyway, because Ubuntu is by default for free software, it doesn't include all the necessary DVD stuff. This being said, they provide 100% of all the necessary code, pre-compiled and all you have to do is install it all with apt-get as follow.

(You must be root to ...

Distributed compilation with Linux C++

I really want to try that feature! I have been using Incredibuild on MS-Windows and it can make a software compile 5 to 6 times faster. (i.e a software normally compiling in 1h compiles in 10 minutes!)

Under Linux some people worked on the C compiler front end to move the process to other machines as required. This is called distcc (i.e instead of using cc to compile, now you use distcc). This front end has a list of all the C compiler machines and uses them whenever possible.)

From what I can see on the front page, the setup should be a breeze (yeah... I know) and it does not even require ...

Check the presence of a table in a MS-Access database

Today I wanted to check whether a table existed in a MS-Access database from a macro define in a MS-Access module.

The test opens the specified database (databaseName) and from that object checks wether a table definition exists (name). I wonder whether there would be a better way to go through the list of items and just know whether an item with that name exists or not instead of generating an error (because the underlaying system will anyway search that list of items for the name, although it may be faster this way in visual basic.)

There is the function I wrote (sample usage: if ...

Multi-level lists in MS-Word... The new way!?

Okay, it has been a little while now, but each time I just have to search forever to find out how to create a multi-level numbering list.

By default, a list will appear as this:

1. Chapter

    1. Section

        1. Sub-Section

Which may work for you, but in many cases you want to have all the list numbers appearing in your section and sub-sections as in:

1. Chapter

    1.1 Section

        1.1.1 Sub-Section

Okay, so that in itself it actually very easy, but it used to be that you could ...

Drupal blocks all disappeared!

Today I had an interesting experience... all of a sudden, all the blocks of a given theme disappeared.

It has been working just fine for months, so I really wasn't sure what the heck it could be.

The fact was that the theme was called the same as the module (as I work for a given client, I tend to do that...)

At some point, I must have added a function with a specific name and that would influence the theme. The result being blocks going bye bye!

I checked and the block content is computed just fine, the problem is the theme('block', $block) call. Although the ...

get_defined_vars() PHP function

Once in a while, I need to get the complete list of all the variables available in a PHP piece of code.

This is done with the get_defined_vars() PHP function. It's very simple, it returns an array of name / value pairs. You can then print that value using print_r() or var_dump().

That's it!

Syndicate content Syndicate content