Linux installation notes (tested under Ubuntu 14.04LTS/12.04LTS), assuming VirtualBox is already installed on host.
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
| <?php | |
| // Published under GPL | |
| // tutorial here: https://codeable.io/community/how-to-import-json-into-wordpress/ | |
| class Developer_Import { | |
| public function __construct() { | |
| add_action( 'wp_ajax_import_developer', array( $this, 'import_developer' ) ); |
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 template for a script I use on a lot of sites to copy the database | |
| # (MySQL) and any uploaded files to the development site, and modify the | |
| # database as required. | |
| # | |
| # The script should be on the development server. The live site can either be on | |
| # the same server, or a remote server connected via SSH. | |
| # |
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 I used to download my live site database onto my development | |
| # server when I used a web host that used cPanel, but didn't give me access to | |
| # mysqldump over SSH (because they had Jailshell enabled). | |
| # Note: The database name (DBNAME) excludes the account name prefix - i.e. | |
| # "dbname" not "sitename_dbname". | |
| curl http://USERNAME:PASSWORD@HOSTNAME:2082/getsqlbackup/DBNAME.sql.gz \ |
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
| <?php | |
| /* | |
| Plugin Name: Easy Download Media Counter | |
| Plugin URL: http://remicorson.com | |
| Description: This plugin allows you to easily count downloads for a wordpress media and display it | |
| Version: 1.0 | |
| Author: Rémi Corson | |
| Author URI: http://remicorson.com | |
| */ |
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 | |
| #Usage: | |
| #Name it something like mysql-db-create.sh | |
| #Make it executable $ sudo chmod 755 mysql-db-create.sh | |
| #Run it sudo ./mysql-db-create.sh dbname dbuser password | |
| # Functions | |
| ok() { echo -e '\e[32m'$1'\e[m'; } # Green |
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
| git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs |
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 | |
| #start | |
| #----------------------------------------------------------------------- | |
| find /srv/backup/daily/databases/ -name '*.gz' -mtime +7 | xargs rm -f; | |
| find /srv/backup/daily/websites/ -name '*.gz' -mtime +7 | xargs rm -f; | |
| # Are Weekly Backups Implemented? | |
| # find /srv/backup/weekly/ -name '*.gz' -mtime +30 | xargs rm -f; | |
| #----------------------------------------------------------------------- | |
| #end |