whattimeisitonthesun.com

... and other useful things

Category

guidelines

Rsync examples

Rsync examples Rsync (Remote Sync) is a commonly used command for copying and synchronizing files and directories remotely (as well as locally) in Linux/Unix systems. With the help of rsync command you can copy and synchronize your data remotely and… Continue Reading →

Copy MySQL users from one server to another

Copy MySQL users from one server to another Copy MySQL users including db-rights: oldserver$ mysqldump mysql > mysql.sql newserver$ mysql mysql < mysql.sql newserver$ mysql ‘flush privileges;’ Remember to add -u $USER and -p$PASSWORD as required  

MySQL: Set field value based on timestamp

MySQL: Set field value based on timestamp UPDATE TABLE SET FIELD=”NEWVALUE” WHERE DATEFIELD < ‘2014-12-23 23:45:01‘;

Move WordPress site to new domain or new location

Move WordPress site to new domain or new location If you change the URL or link location of your WordPress site (e.g from www.olddomain.com to www.newdomain.com) or to another directory location (such as from www.domain.com to www.domain.com/blog), there are some… Continue Reading →

Restart PHP-FPM

Restart PHP-FPM Using SysV Init scripts directly: /etc/init.d/php-fpm restart   # typical /etc/init.d/php5-fpm restart   # debian-style Using service wrapper script service php-fpm restart    # typical service php5-fpm restart   # debian-style Using systemd (newer servers): systemctl restart php-fpm.service   # typical systemctl… Continue Reading →

Restore MySQL db from backup .gz

Restore MySQL db from backup .gz zcat DATABASE.sql.gz |mysql -uUSER -pPASSWORD DATABASE

rsync examples

Rsync examples $ rsync options source destination Source and destination could be either local or remote. In case of remote, specify the login name, remote server name and location. rsync archive mode rsync option -a indicates archive mode. -a option does… Continue Reading →

Add new hard drive to Debian Linux

Add new hard drive to Debian Linux Find out what the device name is for this disk fdisk -l This will give you output similar to this: Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units… Continue Reading →

Archive Outlook email to Gmail

Archive Outlook email to Gmail There are two main reasons for archiving Outlook e-mail to a Gmail account; one is secure backup and two, you will be able to access the mail from any computer. Enable IMAP in your Gmail… Continue Reading →

Get a blank page when opening new tab in Firefox

Blank page when opening new page in Firefox This is how you turn the “New tab page” off in Firefox: In the Location bar, type about:config and press Enter. Look up the browser.newtab.url entry Change the value from about:newtab to… Continue Reading →

Wordpress theme design by Anders NorenUp ↑