- Updated 20 August 2016
- SSH into the Pressmatic box
$ apt-get update$ apt-get install curl php5-cli git subversion$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
| /** | |
| * WordPress dependencies | |
| */ | |
| import { createPortal, useEffect, useState } from '@wordpress/element'; | |
| import { registerPlugin } from '@wordpress/plugins'; | |
| import { Button } from '@wordpress/components'; | |
| function MyToolbarButton() { | |
| // Lazy and one time initializations, also gives us a stable reference. | |
| const [ container ] = useState( () => { |
| export const listCountries = () => { | |
| return [ | |
| { | |
| name: 'Afghanistan', | |
| code: 'AF', | |
| capital: 'Kabul', | |
| region: 'AS', | |
| currency: { | |
| code: 'AFN', | |
| name: 'Afghan afghani', |
| <code_scheme name="Gutenberg" version="173"> | |
| <HTMLCodeStyleSettings> | |
| <option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" /> | |
| </HTMLCodeStyleSettings> | |
| <JSCodeStyleSettings> | |
| <option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" /> | |
| <option name="SPACES_WITHIN_IMPORTS" value="true" /> | |
| <option name="SPACES_WITHIN_INTERPOLATION_EXPRESSIONS" value="true" /> | |
| </JSCodeStyleSettings> | |
| <PHPCodeStyleSettings> |
| define('WP_DEBUG', true); | |
| define('SCRIPT_DEBUG',true); | |
| if ( WP_DEBUG ) { | |
| // Enable Debug logging to the /wp-content/debug.log file | |
| define( 'WP_DEBUG_LOG', true ); | |
| define( 'WP_DEBUG_DISPLAY', true ); | |
| @ini_set( 'log_errors', 'On' ); | |
| @ini_set( 'display_errors', 'Off' ); | |
| @ini_set( 'error_reporting', E_ALL ); | |
| @ini_set( 'error_log', 'php_error.log' ); |
| #!/usr/bin/env bash | |
| # =============================================================================== | |
| # Script to install PHPUnit in the Local by Flywheel Mac app | |
| # These packages are installed | |
| # | |
| # PHPUnit, curl wget, rsync, git, subversion and composer. | |
| # | |
| # WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit. | |
| # The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory. |
| # Steps we will take: | |
| # 1. Change Local (Docker Machine) image type (this will take a bit) | |
| # 2. Resize image | |
| # 3. Resize partion | |
| # | |
| # Also see: https://docs.docker.com/articles/b2d_volume_resize/ | |
| # IMPORTANT: Make sure Local is not running! | |
| VM_NAME="local-by-flywheel" | |
| NEW_DISK_SIZE=50000 |
| 'use strict'; | |
| // The STRIPE-supported currencies, sorted by code | |
| export const currencies = [ | |
| { | |
| 'code':'AED', | |
| 'description':'United Arab Emirates Dirham' | |
| }, | |
| { | |
| 'code':'AFN', |
| function recent_donors_function() { | |
| //Get the latest 100 Give Donors | |
| $args = array( | |
| 'number' => 100, | |
| function recent_donors_function() { | |
| $donors = Give() - > customers - > get_customers($args); | |
| foreach($donors as $donor) { |
| <?php | |
| /** | |
| * Create Recurring Dummy Subscriptions | |
| */ | |
| $subscription = new Give_Subscription( 68 ); | |
| $args = array( | |
| 'subscription_id' => 68, | |
| 'amount' => 20, | |
| 'transaction_id' => md5(uniqid(rand(), true)), |