2017 m. vasario 10 d., penktadienis

javascript find visual center of polygon

https://github.com/mapbox/polylabel

http://stackoverflow.com/questions/22796520/finding-the-center-of-leaflet-polygon

http://stackoverflow.com/questions/16282330/find-centerpoint-of-polygon-in-javascript

Bootstrap free themes

https://bootswatch.com/


http://blacktie.co/2014/07/dashgum-free-dashboard/#more-362

ckeditor bootstrap plugin

https://github.com/kaido24/btgrid

mysql config tuning

https://github.com/major/MySQLTuner-perl

http://www.mysqlcalculator.com/

http://www.tecmint.com/mysql-mariadb-performance-tuning-and-optimization/3/

http://stackoverflow.com/questions/13259275/mysql-tmp-table-size-max-heap-table-size

mysql replication

MHA tool - managing master/slave
https://code.google.com/p/mysql-master-ha/
https://mysqlstepbystep.com/2015/06/01/mysql-high-available-with-mha-2/

master/slave tipologija
https://severalnines.com/resources/tutorials/mysql-replication-high-availability-tutorial

tutorials
http://www.servermom.org/master-slave-mysql-replication-tutorial/
https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-in-mysql
http://dba.stackexchange.com/questions/8680/what-is-the-best-way-to-create-mysql-master-slave-replication-setup-and-troubles
http://www.tecmint.com/how-to-setup-mysql-master-slave-replication-in-rhel-centos-fedora/
http://www.techrepublic.com/blog/tr-dojo/set-up-mysql-database-replication-to-ensure-up-to-date-backups/

On master, lock the database read-only, flush everything.
On slave, stop the mysqld daemon (very important!!!)
rsync the data store directory from the master to the slave
start the slave
unlock the master.

load balancing and high availability

tool http://www.linuxvirtualserver.org/

rsync over ssh with public key (no pass)

https://www.digitalocean.com/community/tutorials/how-to-copy-files-with-rsync-over-ssh

background pattern textures generator

http://bg.siteorigin.com/
https://www.transparenttextures.com/

2017 m. vasario 8 d., trečiadienis

linux cmd delete files in subdirectories older than x days

Be careful with special file names (spaces, quotes) when piping to rm.

There is a safe alternative - the -delete option:

find /path/to/directory/ -mindepth 1 -mtime +5 -delete
That's it, no separate rm call and you don't need to worry about file names.

Replace -delete with -depth -print to test this command before you run it (-delete implies -depth).

shareimprove this answer
edited May 25 '15 at 18:10

Stephen Kitt
59k9104140
answered May 25 '15 at 16:44

basic6
1,5951018
6
Also use -type f to delete files only (and keep sub directories) – Oleg Mar 4 '16 at 8:44
1
Alternatively, if you want to do the same for all files NEWER than five days: find /path/to/directory/ -mindepth 1 -mtime -5 -delete – zmonteca Apr 19 '16 at 17:29