Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
life is happening

Anatolii Bivol toleabivol

🤠
life is happening
View GitHub Profile
View OrderProcessor.php
try {
file_put_contents( 'orderProcessLog', @file_get_contents( 'orderProcessLog' ) . implode( "\n", $lineWithoutDebugInfo ?? [ $result ] ) );
if ( $order->isValid() ) {
file_put_contents( 'result', @file_get_contents( 'result' ) . $order->getOrderId() . '-' . implode( ',', $order->getItems() ) . '-' . $order->getDeliveryDetails() . '-' . ( $order->isManual() ? 1 : 0 ) . '-' . $order->getTotalAmount() . '-' . $order->getName() . "\n" );
}
} catch ( \Exception $e ) {
echo "Error writing to file. Please check permissions.";
echo "Error Message:" . $e->getMessage();
}
@toleabivol
toleabivol / class-fw-extension-nex-update.php
Last active Feb 13, 2018
Update extension for Unyson Theme Update service
View class-fw-extension-nex-update.php
<?php if (!defined('FW')) die('Forbidden');
/**
* Nex Update
*/
class FW_Extension_Nex_Update extends FW_Ext_Update_Service
{
/**
* How long to cache server responses
* @var int seconds
@toleabivol
toleabivol / vip-full
Created Dec 15, 2014
Vip full terminal log
View vip-full
Script started on Lu 15 dec 2014 17:37:49 +0200
]0;tolea@tolea-PC: /var/www/WPtolea@tolea-PC:/var/www/WP$ git clone --recursive https://github.com/Automattic/vip-quickstart.git wp_com
Cloning into 'wp_com'...
remote: Counting objects: 4216, done.
remote: Compressing objects: 20% (1/5) 
remote: Compressing objects: 40% (2/5) 
remote: Compressing objects: 60% (3/5) 
remote: Compressing objects: 80% (4/5) 
remote: Compressing objects: 100% (5/5) 
remote: Compressing objects: 100% (5/5), done.
View vip-log-3
tolea@tolea-PC:/var/www/WP/wordpress.com$ ./bin/vip-init
Already up-to-date.
Submodule path 'puppet/modules/apt': checked out '9b165839640210b8d99e5853bfe171d322f79439'
Submodule path 'puppet/modules/mysql': checked out '911e8bd8f9d6c25c89e728c90379a301bbbaea46'
Submodule path 'puppet/modules/nginx': checked out '761e42e477aa8151e6ed0d36a1294c1488fa5f97'
Submodule path 'puppet/modules/php': checked out 'd94fe100521ec779ce7c6dc256bd8ba8f6a6cf7d'
Submodule path 'puppet/modules/puppi': checked out 'f65b71b7c29c6e62ace55359929aae1add3ebc41'
Submodule path 'puppet/modules/ssh': checked out '35760ef338908f7d4e98ecdcdfd4ad20638629e7'
Submodule path 'puppet/modules/stdlib': checked out '4d2558f383e18bbe322dd0feb073555491216ab4'
Submodule path 'puppet/modules/vcsrepo': checked out '50079b58192ed7a2af1ba6756f75084bc74d33e8'
@toleabivol
toleabivol / vip-log-2
Created Dec 15, 2014
Vip quickstart log 2
View vip-log-2
tolea@tolea-PC:/var/www/WP/wpcom$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
@toleabivol
toleabivol / Vip log
Created Dec 15, 2014
Vip quickstart log
View Vip log
tolea@tolea-PC:/var/www/WP/wpcom$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'precise32'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: wpcom_default_1418631516089_92452
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...