Larsson moving back to Helsingbork

Posted on

Via FootballCorner, swedish striker Henrik Larson is return to Helsinborg at the end of the Spanish season.

 The striker joined Barcelona from Celtic in 2004 but missed most of last season with a knee injury. Larsson also came out of international retirement in order to help his country qualify for this year's World Cup finals.

Tags: Soccer

─── ✧ ─── ✦ ─── ✧ ───

How to: Backup MySQL database & email results using BASH

Posted on

The script below does the same and only depends on mutt (or another command line email client) being installed. A better solution would be not to email the file but to setup ssh key authentication on another server and use scp (secure copy) to send the file over. That way, your database file is transferred over an encrypted connection, which is more secure, and you don't have to wory about your message being blocked due to a large file attachement.


#!/bin/bash # Backup your MySQL database and have it mailed to you # requires mutt or another command line email client if [ -z "$1" ] then echo "Database name expected as the first parameter" exit fi if [ -z "$2" ] then echo "Recipient expected as second parameter" exit; fi # config tmp="/tmp" db_user="backup_user" db_pw="secret" db_name=$1 db_host="localhost" recp=$2 today=`date +%Y-%m-%d` mysqldump_opts="--add-drop-table -acQq" # email settings subject="DB Backup for $1" sql_file=$tmp/$db_name.$today.sql gzip_file=$tmp/$db_name.$today.sql.gz # create the backup mysqldump $mysqldump_opts -u $db_user -h $db_host -p$db_pw $db_name > $sql_file #create the gzip'd attachment gzip $sql_file #send the mail #we could also scp it offsite instead (better) echo "Automated database backup" | mutt -a $gzip_file -s "$subject" $recp #delete temp file rm $gzip_file

I've added one improvement - you have to specify the database name and the recipient email at the command line.

./email_db.sh my_blog_db me@example.com

This makes the script more useful, since you can now loop over a list of your database and their owner's email addresses and send them the backup automatically. Download the shell script: email_db.sh

Tags: Linux, PHP

─── ✧ ─── ✦ ─── ✧ ───

World Cup year = half-baked publicity ideas for MLS

Posted on

Yup, its a World Cup year, that means US Soccer and MLS try to get some publicity and exposure from a non-sports magazine. This year its Maxim, as the press release on mlsnet.com tells us. I'm going to hazard a guess and say that at least these won't be as bad as the GQ pictures prior to the 2002 world cup. But still, how effective is this going to be, beyond the "any publicity is good publicity" type? MLS is hoping to convert new fans, and thinks the appearance is a good way to "occupy a place in pop culture." I'm all for increasing the popularity and profile of the sport in the US, but events like this are pretty gimmicky in my opinion, and don't have the lasting effect people wish (thank god in some cases).

You can also see that maxim put a genius behind the photoshoot - Maxim Fashion Editor MAria Ruocco, who has this gem of a line "We figured that we wanted to do a soccer story to begin with, and what better way than to feature real soccer players,". No, really, how'd you come up with that all by yourself, I would have thought a better story would be to interview the refs, ball kids, shoe manufactures. Good thing I'm not calling the shots.

 Finally, kudos to the players for following the MLS talking points about how great an opportunity this represents. Someone needs to turn the pictures from this into a Movie poster about a rag tag soccer kids team who's helped out by professional players, sent back to earth to turn the team around so that they can get into heaven.

Other reactions:

\

Tags: Soccer

─── ✧ ─── ✦ ─── ✧ ───