Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
| DB="your_database_name" | |
| USER="your_db_user" | |
| PASS="your_db_pass" | |
| HOST="database_hostname" | |
| ( | |
| echo 'ALTER DATABASE `'"$DB"'` CHARACTER SET utf8 COLLATE utf8_general_ci;' | |
| mysql -p $PASS -u $USER -h $HOST "$DB" -e "SHOW TABLES" --batch --skip-column-names \ | |
| | xargs -I{} echo 'ALTER TABLE `'{}'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' | |
| ) \ | |
| | mysql -p $PASS -u $USER -h $HOST "$DB" |
| /* | |
| Plugin Name: Convert WP Database to UTF-8 | |
| Plugin URI: http://topher.wpengine.com/ | |
| Description: Converts the WordPress database (both tables and columns) to UTF-8 character set. | |
| Version: 1.1.0 | |
| Author: Topher Hota (@WPEtopher), Yihui Xie | |
| Author URI: http://yihui.name | |
| */ | |
| /* |
| <?php | |
| namespace KnowTheCode; | |
| require_once( __DIR__ . '/assets/vendor/autoload.php' ); | |
| $x = 9; | |
| $y = 0; | |
| //$z = $x / $y; | |
| //echo $z; |
| <?php | |
| namespace KnowTheCode; | |
| require_once( __DIR__ . '/assets/vendor/autoload.php' ); | |
| $x = 9; | |
| $y = 0; | |
| $z = $x / $y; | |
| echo $z; |
| git clone https://github.com/KnowTheCode/Non-WordPress-Sandbox . | |
| composer install |
| mv composer.phar composer | |
| chmod 750 composer | |
| mv composer ~/bin |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| php composer-setup.php | |
| php -r "unlink('composer-setup.php');" |
| <?php | |
| class SecureSessionHandler extends SessionHandler { | |
| protected $key, $name, $cookie; | |
| public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
| { | |
| $this->key = $key; | |
| $this->name = $name; |
| # Homebrew and Cask | |
| Install the XCode command line tools by running `xcode-select --install` in the terminal. | |
| Install Homebrew by following the instructions on the [homebrew website](http://brew.sh). | |
| Install Cask by following the instructions on the [cask website](https://caskroom.github.io). | |
| # Applications |