I think I mentioned earlier how I almost started writing a website in C and quickly realised that wasn’t the right tool for the job, and switched entirely to PHP. For the work I did today I needed a good set of data structures: A set of files Each with a set of english strings …
Continue reading I knew there was a good reason I liked CIn the last year I’ve had to use CPAN several times. Perl people are all fancy and insist on all the perl modules to have unit tests. Commendable, except when it doesn’t work. At least half of the times I used CPAN the unit tests failed. CPAN smarty pants decides not to install modules that …
Continue reading Some more evidence why unit tests are uselessNew post added to Linux Stuff: Filtering spam into a folder on Slackware/Sendmail using SpamAssassin.
Continue reading Filtering spam into a folder on Slackware/Sendmail using SpamAssassinNew post added to Linux Stuff: Changing the first day of the week in Slackware Linux.
Continue reading Changing the first day of the week in Slackware LinuxI have this silly little website called Linux Stuff, where I post things I learn about Linux that I think might be useful for other people as well. When a new article is posted I get an email about it, piece of cake using the PHP mail() function. For some reason (I already forgot why) …
Continue reading Linux Stuff notifications on this wordpress blogA set of circumstances have left me with a lot of time on my hands. I’ve spent some of several days reading back posts on Garth Turner’s blog. He got kicked out of the conservative party so probably isn’t a total asshole. I started reading it because of my interest in real estate, and the …
Continue reading Save your money? Impossible.Ever since I learned how CGI works (a couple of lifetimes ago) I was bothered by the fact that the source code is accessible by the web server, and by extension – by anyone on the internet. If your CGI module is properly loaded and configured then Apache will execute the files rather than display …
Continue reading Looking at .inc files on an Apache serverIf someone updates a po file with 100 translations – I need to figure out whether each translation is already in the database, and if not – insert it. The result looks like this (more about “looks” later): This is just a snippet. I am concerned that running an SQL query like this: “SELECT Translation.TranslatedString …
Continue reading Number of SQL queries per pageBy Andrew Smith I will have something like this on one of the pages in the website: Each of those dropdown lists has the 190 language codes I mentioned in the previous post. It may not sound like a lot but 1900 <option> values really is a lot of HTML. It’s very easy to generate …
Continue reading Smaler PHP-generated HTMLOne of the things I will need in my database is a table with all the language codes used in Linux locales. Things like en, fr, es, etc. There are lots, but where do I get a reliable list? I’ve done some searching and found the IANA language subtag repository. It’s a 45000 line text …
Continue reading Scraping data from a reliable source