Skip to content

Instantly share code, notes, and snippets.

View Tauxxx's full-sized avatar
🎯
Focusing

Alexandr Tauxxx

🎯
Focusing
View GitHub Profile
@Tauxxx
Tauxxx / YClientsController.php
Created February 18, 2026 23:35
YClients <--> Bitrix24
<?php
namespace App\Http\Controllers;
use App\Services\YClientsService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Throwable;
@Tauxxx
Tauxxx / http-basic-cron-request.php
Created January 11, 2019 06:59 — forked from nicholasohrn/http-basic-cron-request.php
WP Cron with HTTP Basic Authentication
<?php
if(defined('WP_CRON_CUSTOM_HTTP_BASIC_USERNAME') && defined('WP_CRON_CUSTOM_HTTP_BASIC_PASSWORD')) {
function http_basic_cron_request($cron_request) {
$headers = array('Authorization' => sprintf('Basic %s', base64_encode(WP_CRON_CUSTOM_HTTP_BASIC_USERNAME . ':' . WP_CRON_CUSTOM_HTTP_BASIC_PASSWORD)));
$cron_request['args']['headers'] = isset($cron_request['args']['headers']) ? array_merge($cron_request['args']['headers'], $headers) : $headers;
return $cron_request;
}
@Tauxxx
Tauxxx / functions.php
Created July 31, 2018 05:57 — forked from yratof/functions.php
Woocommerce remove unused attributes on product variations
<?php
add_action( 'init', function() {
ini_set( 'memory_limit', '2048M' );
set_time_limit( 0 );
$posts = get_posts( [
'post_type' => 'product',
'posts_per_page' => -1
] );
$count = 0;
@Tauxxx
Tauxxx / dump.php
Created July 26, 2018 10:40 — forked from branneman/dump.php
PHP: A better formatted var_dump()
function dump($var) {
ob_start();
var_dump($var);
$output = ob_get_clean();
echo preg_replace("/=>(\s+)/m", ' => ', $output);
}