This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- delete any usermeta specific to the other subsites | |
| delete from wp_usermeta where meta_key regexp '^wp_([0-9]+)_'; | |
| -- duplicate the wp_usermeta structure in a working data table, | |
| -- but add a unique index for filtering out duplicates | |
| create table _fix_usermeta like wp_usermeta; | |
| -- fix to allow larger keys on InnoDB | |
| set global innodb_large_prefix = 1; | |
| set global innodb_file_format = BARRACUDA; | |
| alter table _fix_usermeta ENGINE=InnoDB; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo sysctl -w net.inet.ip.forwarding=1 | |
| sudo sysctl -w net.inet.ip.fw.enable=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This is a script to take a MySQL dump and upload to Google Drive. | |
| # Uses gdrive https://github.com/prasmussen/gdrive. See the gdrive readme first. | |
| # The path to the gdrive binary | |
| GDRIVE_BIN=/usr/sbin/gdrive | |
| # Use "gdrive list" to get the id of the directory where you want to upload the files | |
| BACKUP_DRIVE_DIR= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ps -C $1 -O rss | awk '{ count ++; sum += $2 }; END {count --; print "Number of processes =",count; print "Memory usage per process =",sum/1024/count, "MB"; print "Total memory usage =", sum/1024, "MB" ;};' |
NewerOlder