Syndicate content

time

When I lose the Gnome settings...

Now a day, I very often lose my Gnome settings. Most of it, I couldn't care less, but a few things are very important, especially the way my windows work: I HATE it when a window comes to the front when clicked on. It is totally crazy to work that way. Gnome supports the normal X11 way but they don't use that as the default, which is sad.

So I wrote a little script in order to be able to reset my settings without having to open CCSM (the Gnome preference tool) although if you have a hard time finding what you are looking for, CCSM can be useful!

There is my current script that fixes ...

Bad move for PHP unpack()! So unpack() stopped working?

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

Why are my "vim: ..." commands not activated?

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

Console color: dark blue on black unreadable

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

Classes in JavaScript (from complex objects to proper classes)

When creating objects (commonly called JavaScript classes) in your JavaScript code, you want to use the prototype. This is the only clean way of doing it. In JavaScript, you can create objects on the fly, but those are not considered safe.

Quick and Dirty

The quick way is to create an object directly. This works, but it has potential problems with used against a powerful optimized such as the Google Closure Compiler.

All the Quick and Dirty examples can make use of this in their myFunc examples. However, the closure compiler will warning about all of them because it doesn't know for ...

Large scale Linux console

As I am working on our Snap! C++ CMS, I created a set of virtual systems to test the compilation on "clean" system (yeah! my main computers has all sorts of things that I don't even know about...)

In those virtual system, I only install the basic server and then do a sudo apt-get install of anything else the server needs to get compiled. This includes libraries such as libmagic, boost, and Qt and some tools like xmllint. This is pretty cool, but when working in a console, and that console is very small, it makes it a bit difficult, so I looked into making it big.

For this ...

My NVG 510 broadband light is blinking red

Somehow my NVG 510 broadband light started blinking red a couple of time in the last few days. I've been wondering why and I think I have the answer now.

In most cases it may just be that the broadband signal disappears for too long and the modem disconnects.

However, in my case, I think it was because they made an upgrade (a push!) on the modem because a few things do not work as expected anymore. (i.e. I cannot access the nsh shell anymore...)

Whenever software is upgraded, the likelyhood that you have to reset the whole thing is very high. I had to restart twice and even after that, ...

Useful online network tools

I'm starting this page and hope to think about it again at a later time when I find additional tools... but as I have network problems I often need these types of services to make sure I can get the information I need.

For more Network stuff, click on the Network tag!

What is your IP address?

Check your current IP address from your browser:

http://alexis.m2osw.com/nvg510/my-ip.php [Super clean version!]

http://www.whatismyip.com/ [More advance and with ads...]

What is my DNS?

This one is for people who setup a DNS to make sure that it can accessed from all over the world. It ...

Apache log says: client denied by server configuration

I work with Apache a lot. It is a really good web server that has many options and features. Unfortunately, maybe it has too many of them!

I ran in a problem where a notification from one server to another would fail with the following error:

[Fri Oct 11 19:43:50 2013] [error] [client 162.226.130.121] client denied by server configuration: <path to file>

Looking at the error, I was first thinking that my script was generating the error. The fact is that my script does not generate error 403. It has a 400 and 500 but not 403.

So looking at the error I thought, maybe that's an ...

log4cplus bug in handling %q in older versions

In the last few days I've been trying to find the reason for a slowness in one very specific case in a software. It looks like it crashes and since it includes many try/catch with (...) it certainly captures the fact, but contrary to what it is expected to do, this one does not get logged! In any event, I wanted to prove that the area where we first were looking was not affected, and sure enough it was not. The problem is somewhere else. However, to prove that I needed to have a way to log milli-seconds because things happen very fast and a 1 second decimation is definitively not enough.

Syndicate content Syndicate content

     

Terms of Site Index

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