It comes to that point in time when you need a country table in your database and you do not have a list to import at hand, after scouring the web a bit, everything seemed to be out of date, so I wrote a little script to scrape the details from a wikipedia page for the ISO 3166-1 standard for country codes.
I wrote and ran the following quick & dirty JQuery script on that page.
if($('#output_textarea').length == 0){
$(document.body).append($('<textarea rows="128" id="output_textarea"></textarea>'));
}
document.output_textarea_val = "";
$('#sortable_table_id_0 tr').each(function(idx){
if(idx > 0){
document.output_textarea_val += "INSERT INTO country (name, code_alpha_2, code_alpha_3, code_numeric) VALUES(";
var cells = $('td', this), cellLen = cells.length;
cells.each(function(cellIdx){
if(cellIdx < 4){
document.output_textarea_val += "\"" + $(this).text().trim() + "\"";
if(cellIdx < cellLen - 2){
document.output_textarea_val += ", ";
}
}
});
document.output_textarea_val += ');\n';
}
});
$('#output_textarea').val(document.output_textarea_val);
This script creates insert statements for mySQL and inserts the results into a text box at the foot of the page, in order for it to work you need to inject jQuery into the document, you can do this with the jQueryify Bookmarklet.
I have tested this script and it qualifies for the "works on my machine" certification programme.

The script produces the following output.