The Ultimate Guide To UTF-8 and MySQL

How character encodings work in MySQL seem to continue baffle people, at least based on the number of questions posted on Stackoverflow. Read on if you have an application that still outputs funny text like “señor” or “se�or” where “señor” is expected. The truth about text in MySQL Strings in MySQL consist of an encoding …

Grouping data

Suppose you are faced with the task of taking a list of things and grouping them by some attribute, like turning the following list country-city pairs… input=[(“USA”, “New York”), (“USA”, “San Francisco”), (“USA”, “Los Angeles”), (“UK”, “London”), (“UK”, “Manchester”), (“UK”, “Edinborough”), (“Spain”, “Madrid”), (“Spain”, “Barcelona”), (“Spain”, “Granada”), (“Finland”, “Helsinki”), (“Finland”, “Oulu”), (“Finland”, “Kuopio”)] into lists of …

Crazy fast AJAX search suggest in CakePHP

The fastest AJAX call is the one that is never made. Network latency makes using AJAX applications like Google instant search, or even the common autocomplete field, feel like running in treacle*. Having the browser run to the server for more data every time the user pushes a key just doesn’t work well. Many times …

5 cool things you can do with SSH besides logging in

You probably already know ssh and that you can use it to log on to remote machines with “ssh user@example.com.” Type in the password and It Just Works™. But that’s not all you can do. You can also… Transfer files. The OpenSSH client comes with the file transfer programs sftp and scp. They use the …