The Linux Page
  • Lately, I noticed that I always had a clamav.inoc.net connection. I was wondering why... I did install clamav but I did not recall changing anything in Apache where I'd get requests from the outside that would look like clamav.

    The fact is I also installed freshclam. By default, that gives you a line like this in your netstat -a64 listing:

        tcp   383     0 halk:38272       clamav.inoc.net:www     CLOSE_WAIT

    Most of the time you won't catch it when it is still connected and sending/receiving data. The deamon that accepts the connections is freshclam and it will save the new data ...

  • 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 ...

  • Today I started testing a lot of my JavaScript / jQuery code from a website I am building for a customer. I got an error, at some point, saying:

    SCRIPT5007: Unable to get property 'replace' of undefined or null reference

    The error was in link with the 'replace' function being referenced on an innerHTML of an element. More specifically, one of those XML element (probably the top most one.)

    The fact is that Internet Explorer does not support innerHTML in an XML document. Not to be too surprised about that, XML is not HTML so there is really no reason why innerHTML should be ...

  • I use VirtualBox and had a problem with copying files between my host (main computer on which you boot your computer) and the guests (virtual computer that you run on your host).

    The fact is that it is all explained right here:

    http://www.virtualbox.org/manual/ch04.html#sharedfolders

    There are a few steps as follow.

    Install the Virtual Box Tools

    Install the Virtual Box Tools (called Guest Additions) on your guest; these tools allow your guest to communicate with the host to allow files to be written in a directory on the host.

    To install those, it should be as easy as using the ...

  • Copying an entire partition to another when both are not of the exact same size (in blocks) can be tricky, especially if that partition includes special files such as /dev/hda and FIFOs.1

    Yet, there are several ways to do so:

    • 1. Note that was the case especially in the 90's. As of today, things have come a long way and there are command line options one can use with the cp and tar instructions to copy pretty much anything. You will still have problems with some files such as locks, though. But you should not have to copy them!
  • When moving a database from one computer to another, you've got to copy all the data.

    For PostgreSQL, there is a pair of functions named pg_dump and pg_restore.

    In most cases that works great, however, some systems may create things such as additional functions that will NOT make it across. I do not know how to get that to work (and maybe it works in newer version of PostgreSQL?)

    In any event, in most cases the following commands are enough (I used them with Drupal websites and since they stopped using some of the definitions they have in the system.install file used on initialization, ...

  • Of Note: This only applies to C99, not C++.

    I learned something quite interesting today and wanted to keep a note of it.

    Whenever I use a printf() with a format such as %ld and try to compile my code on "many" different platforms, I often get warnings on another one.

    The fact is that an int, a long, a long long, an int32_t, int64_t all use a different combination depending on your platform and whether you're running in 32 or 64 bit.

    So, the answer to this problem are the #define found in the inttypes.h header file:

    PRId8
    PRId16
    PRId32
    PRId64
    

    These entries are used after

  • MS-Access defines many different types, including a newer one called DECIMAL.

    You are supposed to be able to create tables with the DECIMAL type. So a statement such as:

       CREATE TABLE MyTbl (decimal_test DECIMAL(20, 5))
    

    should work. Right?

    I have been using CurrentDb.Execute for a while and that statement was causing the Execute function to return an error saying that the field definition was erronous (Syntax error in field definition, to be exact).

    The trick is very simple!

  • LVM today can create a mirror of your data without having the need for mdraid (or hardware raid).

    Problem is, I did not find any documentation that makes sense and there doesn't seem to be a graphical interface that can help you with that (at least not under Ubuntu Gnome.)

    So... I decided to spend the time because that's probably less time anyway than trying to create and maintain and md device.

    The fact is, it is rather simple, but requires quite a bit of knowledge.

    Copying the Partitions Exactly

    First, I wanted the partitions to be exactly the same and using fdisk did not ...

  • As I am now using git, I like to create my own repositories. In most cases the documentation is not that easy to follow. Here are the instructions I use.

    First of all, I setup my own personal configuration (it can be used as a global setup for you). This is written in the ~/.getconfig and looks like this:

    [user]
        name = AlexisWilke
        email = me@my-top-secret-email-address.com
    
    [core]
        excludesfile = ~/.gitignore
    [push]
        default = simple
    [giggle]
        main-window-maximized = false
        main-window-geometry = 1114x789+144+184
        file-view-vpane-position = 389
        ...
Syndicate content

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.

     

   

Terms of Site Index

Find the page/content you are looking for with our index.

  • Objective C
  • filter
  • friend
  • password
  • ps

    Unix command line tool used to list processes currently running. On some older Unices, it would also show zombies (processes that have exited but with parents who have not yet acknoledged their death.)