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 | |
function return_get_user() { | |
$apikey_config = return_generate_apikey(get_option('mpq_email'), get_option('mpq_password')); | |
$url = get_url_api() . 'getUser'; | |
$curl = curl_init($url); | |
curl_setopt($curl, CURLOPT_URL, $url); | |
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json', |
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 | |
add_filter( 'coordinadora_shipping_calculate_cost', 'coordinadora_shipping_calculate_cost_filter', 10, 2 ); | |
function coordinadora_shipping_calculate_cost_filter($data, $package){ | |
global $woocommerce; | |
$coordinadora = new WC_Shipping_Method_Shipping_Coordinadora_WC(); | |
$state_destination = $package['destination']['state']; | |
$city_destination = $package['destination']['city']; | |
$items = $woocommerce->cart->get_cart(); |
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 | |
namespace App\Traits; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Exception\RequestException; | |
trait Elastic | |
{ |
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 | |
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | |
directory=$1 | |
echo "#######Instalando laravel...#######" | |
composer create-project --prefer-dist laravel/laravel $directory | |
#Navigation to directory | |
cd $directory |
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 | |
##change port nginx for 8080 | |
#### For centos create directories | |
#sudo mkdir /etc/nginx/sites-available | |
#sudo mkdir /etc/nginx/sites-enabled | |
rutaRelation=/var/www/user/ | |
echo "Dominio o subdominio a agregar (example.com), (sub.example.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
sudo apt-get update | |
sudo apt install nginx | |
sudo apt install mysql-server | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install php7.1-fpm php7.1-cli php7.1-common php7.1-json php7.1-opcache php7.1-mysql php7.1-mbstring php7.1-mcrypt php7.1-zip php7.1-fpm php7.1-gd php7.1-curl php7.1-soap php7.1-intl php7.1-simplexml php7.1-bcmath | |
curl -sS https://getcomposer.org/installer | php | |
sudo mv composer.phar /usr/local/bin/composer | |
chmod +x /usr/local/bin/composer |