Filed Under (Databases, Linux) by admin on 27-12-2009
Simple DB backup
mysqldump -h [server name] -u [user name] [db name] -p > site-db-`date +%y%m%d-%H%M`.sql
Complete MySQL dump with compression
mysqldump –all-databases -u admin -p`cat /etc/psa/.psa.shadow` > `hostname -s`-mysql-`date +%y%m%d`.sql
tar zcf `hostname -s`-mysql-`date +%y%m%d`.tgz `hostname -s`-mysql-`date +%y%m%d`.sql
rm `hostname -s`-mysql-`date +%y%m%d`.sql
Complete HTTP sites data with compression
cd /var/www/vhosts/
tar zcf `hostname -s`-sites-`date +%y%m%d`.tgz * –exclude=*/statistics/* -v –exclude=ilatina.com/httpdocs/downloads/
mv `hostname -s`-sites-`date +%y%m%d`.tgz /root/.data/`hostname -s`
Filed Under (Databases) by admin on 02-09-2009
If you need to quickly generate passwords within MySQL, you could try one of the following methods:
-
SELECT CONV(FLOOR(RAND() * 99999999999999), 10, 3);
-
SELECT SUBSTR(MD5(RAND() * 99999999999999), 1, 10);
Filed Under (Annoyances) by admin on 20-08-2009
If you don’t get this, you haven’t worked that much time on Web sites… (feel lucky!)

Breadcrumbs over my keyboard
Filed Under (Linux, mod_rewrite) by admin on 31-07-2009
Today I was playing (more) with mod_rewrite, and came to an interesting requirement: how to redirect a page that receives a specific parameter value to another URL (as in article.php?id=57 to article.php?id=686)?
Read the rest of this entry »
Filed Under (Uncategorized) by admin on 16-05-2009
Quick collection of sites that will help you generate test content:
General copy
http://www.blindtextgenerator.com/
http://www.lipsum.com/
Names
http://www.fakenamegenerator.com
http://www.generatedata.com/#generator
Filed Under (DNS, Linux) by admin on 19-03-2009
Today I was configuring a DNS server and noticed that not much reference on how to create records that match any host exists.
What I needed was to setup up a proxy server using a domain that was has its website and email externally hosted, while giving the LAN users the option to enter proxy.example.com as the proxy name server. Basically, I needed the DNS server to return a local IP address for the proxy and the real Internet addresses for the other hosts. I came with two possible solutions: Read the rest of this entry »
Filed Under (Bolivia) by admin on 24-02-2009
I was happy to see some days ago that Google now covers Bolivia on Google Maps! Most of the specific addresses that I looked up returned an inaccurate result which Google presents with a “Placement on map is approximate” but this is really a good start.
Some cities include: Read the rest of this entry »
Filed Under (PHP) by admin on 23-02-2009
Use the following PHP code to encode Microsoft Office Word special formatting characters (like m dash, bullets, typographic quotation marks, etc) as HTML entities.
Read the rest of this entry »
Filed Under (Yahoo! Stores) by admin on 29-12-2008
Ok, so after spending countless hours customizing your Yahoo! Store, you find that every time you create a new item you must change the template used for it. Wouldn’t it be really convenient if Yahoo! just applied your customized template for new products? Read the rest of this entry »
Filed Under (Telecom) by admin on 29-08-2008
Around August 25th tigo launched the 3G service in the three major cities of Bolivia.
Although the 3G prices seem fair ($ 15 for 1000 MB/month), the major drawback that I see is that you must have an active phone number to obtain the them. The prepaid offer seems to be just too high and doesn’t really make sense (about $ 3 /day).
Let´s see when Viva and Entel will catch up…