background image

Monday 26 September 2011 - By Thomas Muguet - web - Also available in Français

header.jpg

I modified the liteAccordion plugin to be able to use jQuery UI themes.

liteAccordion.jpg

The usage is the same, except that you also need to include the jQuery UI CSS theme (no need for the jQuery UI Javascript framework though).

To find a demo and download the plugin, see the project on GitHub.

Thursday 8 September 2011 - By Thomas Muguet - dev - Also available in Français

header.jpg

Little question

What's the output of this PHP file ?

case0-1.png

If you answer "hello world" : congrats, you know how to read PHP !

But if you answer "?���" : actually, you are right !

Proof : case0-4.png (same effect via command line)

Why ?

First clue : the entry title

Second clue by showing the invisible characters : case0-2.png

Third clue by doing an hex dump : case0-3.png

"0" characters are present and it seems PHP doesn't really like these characters...

It looks funny at first, but, when not knowing about it, debugging a project with a file containing "0" characters is pretty painful...

FIY, this file hasn't the same effect depending on the configuration... I had this strange behavior on my laptop. On my server, I had several "PHP Warning: Unexpected character in input: ' in hello.php on line 2" messages, much nicer...

Saturday 3 September 2011 - By Thomas Muguet - IT - Also available in Français

header.jpg

Here's a widget I did a few years ago and that I rediscovered today.

This widget, "Simple password generator", simply generates passwords, with the desired length and using desired characters.

spg.png

The screenshot is in French, but the widget should be in English.

To download the widget : spg.zip (Mac OS X 10.4.0 and superior)

Here's also the project file for Dashcode for the curious ones : password.wdgtproj.zip (as I don't see any reason to put a license on this kind of project, I put it in public domain, so you can do whatever you want with it).

EDIT: you can also find this project on GitHub.

Wednesday 24 August 2011 - By Thomas Muguet - kasagi - Also available in Français

Le site de k’ą́sagi est enfin en ligne avec en bonus une plateforme de démonstration !

k’ą́sagi (prononcer kansagui) est une application web à destination des associations, entreprises, etc pour la gestion des cotisations et des événements. Gestion multi-utilisateurs, tarifs personnalisés : simplifiez-vous la vie ! L'application propose en plus des statistiques au jour le jour et des statistiques prévisionnelles. En bonus, il existe une version offline de l'application !

L'utilisation de l'application est gratuite ; me contacter si vous êtes intéressés.

Friday 5 August 2011 - By Thomas Muguet - web - Also available in Français

header.jpg

I rediscovered referrer-spam because of the stats of my website..

The symptoms : a lot of websites -of course, malicious- pretending to link your website, and showing in your stats. The goal is to get a better popularity in search engines if your stats are public. It also completely messes up your stats with dummy traffic...

It is hard to completely get rid of such spam, but here's a technique to hide theses sites in the referrers and to consider the associated traffic as "not seen" (like bots and worms)...

I noticed all spams had in common :

  • the method is HEAD
  • the protocol HTTP/1.0

The requests were made from a little range of IP addresses, but I doubt the efficiency of IP filtering (at least with this solution)...

So I considered that all requests by HEAD and HTTP/1.0 and with a referrer are spam. It is a pretty strong postulate : there can be false-positives, and if someday the spammers use GET and HTTP/1.1, it won't work... But for the moment, it does work.

Monday 1 August 2011 - By Thomas Muguet - blog - Also available in Français

After a few hours of hard battle, I finally managed to get the localization working...

From now on :

To get there, I used the plugin , and some hacks to force the language from the domain name, and to translate all the widgets.

Sunday 31 July 2011 - By Thomas Muguet - web - Also available in Français

It is always nice to have a table of contents in posts (especially in long ones).

So I spend the night finding a way to generate a TOC for Dotclear posts.

The final result is something like that (results should vary depending on your theme) :

TOC.jpg

Sunday 31 July 2011 - By Thomas Muguet - système - Also available in Français

If trying to connect via PuTTY to an OpenSSH server via public/private key and you get the frustating "Server refused our key", here are some elements to check...

Sunday 19 June 2011 - By Thomas Muguet - web - Also available in Français

header.jpg

I wanted to get statistics on my websites on my Debian Squeeze server, and found Awstats. But what I really wanted was :

  • having the statistics by virtual hosts (eg. www.thomasmuguet.info, blog.thomasmuguet.info, www.kasagi.fr, ...)
  • seeing the statistics on one or several dedicated virtual hosts (eg. stats.thomasmuguet.info, stats.kasagi.fr, ...)
  • keeping all my stats in the access log, which is rotated

Here's a way to do it.

Saturday 18 June 2011 - By Thomas Muguet - blog - Also available in Français

Yet another blog. Non pas que j'aime raconter ma vie, mais plutôt parce que :

  • aux détours du web je croise parfois des choses qui méritent d'être partagées (certains articles sont issus de ma liste de partage Google Reader) ;
  • lorsque je galère sur des problèmes IT où aucune solution n'est apportée, et que je trouve une solution, ça pourrait servir à d'autres.

Je ne garantie pas pour autant qu'il n'y aura pas de billets totalement inutiles...

Table of contents
© 2011 - Thomas Muguet
Powered by Apache Server Powered by Debian Powered by PHP Powering World Community Grid