// archives

Archive for March, 2011

Using MySQL Stored Procedures for User Authentication

Scenario: You want to authenticate users into a private web site by accepting an e-mail address and a password. You don’t want to do a bunch of security on the front end however you do want to use a token on the client for various purposes. Also, you want the tokens to expire automatically and […]

How to use Bash to extract Qmail accounts for OpenSRS import

Since I happen to be going through the pain of a bulk migration from Qmail to OpenSRS, I figured I can’t be the only one. Here’s a Bash script I wrote to extract Qmail users accounts into a CSV file. Enjoy! #!/bin/bash # # # Simple Email Account Extractor for Qmail # – Extracts username/password […]

Creating a MySQL Function to convert miles and kilometers

MySQL has the ability to create user defined functions that can be called just like the built-ins. There was a recent project that involved some distance calculations. As part of the performance testing, we experimented with moving the logic around to different parts of the application stack. Here’s a short example of two functions created […]

%d bloggers like this: