Why do witches burn?

Because they’re made of wood, like bridges, and so float on water, like churches, very small rocks, gravy, and a duck.

Archive for the 'My useful scripts' Category

Make simple Variables and Identifiers

Le mardi, décembre 10th, 2013

(This pages contains a few weird characters like kanjis that may not display properly on your computer. Don’t worry, it’s not essential to the text) (J’ai mis ce texte dans la version française aussi par flemme de le traduire. Vous y arriverez, allez-y !) Unicode is the future (even the present), but please, not in […]

Read the rest of this entry »

PHP functions reminder

Le mercredi, avril 10th, 2013

I love PHP, but when it comes to consistency, it sucks very very very hard. I’m tired of going to the (very very good) php.net site to check functions arguments and order and such, so now, all what I usually check will be here. Nothing here is « complete ». My goal isn’t to make a doc, […]

Read the rest of this entry »

Backup organizer

Le jeudi, mai 6th, 2010

Backuping data is real easy (with linux). I use three different ways: For a data base BDD : mysqldump [cnx infos] |gzip > backupbdd.sql.gz For not too numerous files, which data is important, like configuration ones: tar czvf yoyobackup.tar.gz dafiles/ For files I want to access easily and/or numerous : rsync -av me/ othercomputer:me/ In […]

Read the rest of this entry »

Photoshop Text Extractor

Le mercredi, mars 17th, 2010

While making Geek’s World, I often change the text at the last moment. As a result, the content of the .psd file was more accurate than the text in the database. Plus, I also used to translate from English to French directly in photoshop. And as I want to display the text on my webpage […]

Read the rest of this entry »

Convert HTML into BBcode

Le mercredi, avril 8th, 2009

BBcode is the syntax used in phpBB forums and some other websites with edit forms, due to it’s simple and intuitive syntax, opposed to that stupid wiki code no one ever gets. If, like me, you ever wanted to post the content of an html page, this Perl script is for you. It takes a […]

Read the rest of this entry »

Displaying a progress bar

Le dimanche, mars 1st, 2009

Ok, it’s not really a bar. Draw something, being careful of the width of your command-line terminal, is tricky. But, you’ll get the display of the percentage of progress of the script and the time that is probably remaining. Example. You have a script doing 20,000 times about the same thing. You want to know […]

Read the rest of this entry »

Be careful, this is the translation of two French articles and it’s long. Today we will be writing time in a way that is comfortable for a human reader. Who want to read, « Only 0h 00mn 18s left » at the end of a count that began an hour ago? Before, strftime() was enough. Now, time […]

Read the rest of this entry »

Translation SQL table and translation system

Le mardi, février 10th, 2009

This is a short, non-interesting article about a translation system. Nothing new or original here. I put here because my next article will use it and it’ll be a very long one. I a few month, I’m gonna talk a lot about translation. I’ve made many things about it, especially for automatic translations. Here, it’s […]

Read the rest of this entry »

List all 404 errors from a Apache server

Le lundi, janvier 26th, 2009

This is not the only solution to know if your website got dead links. For example, Awstats will tell you them too, but only from on site at the time. Also, online dead link finders are you friends, like W3C Link Checker. My solution works directly on the server, and also find the errors that […]

Read the rest of this entry »

Url rewriting is your friend

Le vendredi, novembre 28th, 2008

Url rewriting, is to have a link to a webpage that a human can read, and a search engine can interpret as keywords. Many blogs use this, they use the title of the post in the url. Example : Good: http://toto.com/articles/eat-creme-brulee.html Bad: http://toto.com/2007/article.php?id=684 You english reader may not care about this, but the main problem […]

Read the rest of this entry »