Skip to content

Instantly share code, notes, and snippets.

Arnaud Coolsaet pecuchet

Block or report user

Report or block pecuchet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View php-simple-array-to-csv.php
<?php
class CsvLog
{
/**
* @var string
*/
private $path = '';
/**
* @var array
View php-custom-log.php
<?php
error_reporting(E_ALL);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', __DIR__ . '/logs/php-error.log');
@pecuchet
pecuchet / laravel-guzzle-response-cache.php
Created Mar 11, 2018
Simple Laravel 5.5 + Guzzle 6 cache middleware
View laravel-guzzle-response-cache.php
<?php namespace App\Clients\Middleware;
use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Promise\PromiseInterface;
use GuzzleHttp\Promise\FulfilledPromise;
use Illuminate\Contracts\Cache\Repository;
/**
@pecuchet
pecuchet / wp_terms_checklist_args_hierarchical.php
Last active Nov 19, 2017
WordPress admin: prevent hierarchical categories/terms lists to be flattened in their meta box
View wp_terms_checklist_args_hierarchical.php
<?php
add_filter( 'wp_terms_checklist_args', function ( $args ) {
$args['checked_ontop'] = false;
return $args;
} );
You can’t perform that action at this time.