Archive | Development RSS feed for this section

Reticulator

12 Apr

Rescued from the total darkness of my hard disk, a little experiment in Python I made a couple of years ago…

The Reticulator!

Basically is a web tool to make modular grids in CSS. It has some minor bugs but as said, it was a little experiment, so we’ll have to live with them. The CSS generated is mostly cross-browsing (at least, it was :D) and the grid positions are based on position:relative not position:absolute.

Source code is availablehere (it works as a command line tool also).

WordPress and HTTP Basic-Auth

9 Apr

This post is for those of you with the same problem, say thanks to Google!

Problem: With WordPress and permalinks enabled, if you protect a folder or a file with .htpasswd, you’re going to get a nasty 404 Not Found.

Solution: Just add to your .htaccess file the following lines:

ErrorDocument 401 /[path_to_the_file]/myerror.html
ErrorDocument 403 /[path_to_the_file]/myerror.html

When /[path_to_the_file]/myerror.html is an existant static file in the server.

Explanation: Seems like the HTTP Basic-Auth returns a 401 Unauthorized to ask for the password. This got translated into a ErrorDocument directive, and if you haven’t properly set it up in your .htaccess (for example, pointing to some non-existant file), then it will be finally got by WordPress, which will return a 404 error.

Conclusion: Madness is here! I don’t understand how this isn’t better documented. Hope this helps!

UTF8 y los charsets: Ese dolor de cabeza

21 Mar

Hace ya bastante que me tuve que pelear con los charsets y el dichoso UTF8, y ahora a raíz de un amigo el incidente ha vuelto a mi cabeza. Los charsets son esos tranquilos y apacibles animalitos de pelo suave y sedoso que te encanta acariciar, pero que como algún día les caiga agua encima, la has jodido… Pues eso me pasó a mí…
[...]