Skip to content

Instantly share code, notes, and snippets.

View pthiers's full-sized avatar

Philippe Thiers pthiers

  • RiskAmerica SPA
  • Puerto Octay, Chile
  • 21:14 (UTC -04:00)
View GitHub Profile
@pthiers
pthiers / MariaDB.php
Created October 23, 2017 14:05
Dynamic column mariadb array to column_create
namespace App\Utils;
use Illuminate\Support\Collection;
class MariaDB
{
/**
* @param $arr array|Collection
@pthiers
pthiers / gist:4accfe72b11c2086f3f4ccf00c930780
Created January 24, 2019 14:29
Find and Replace with capture group with alias intellij idea
Find: (?<col>.*?) [x] Regex
Replace: '${col}'
zend_extension=xdebug.so
xdebug.idekey = "PHPSTORM"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_connect_back= on
xdebug.remote_port=9000
xdebug.remote_autostart=on
xdebug.default_enable=0
xdebug.profiler_aggregate=0
xdebug.profiler_append=0
@pthiers
pthiers / xdebug.ini
Created September 3, 2020 15:13
xdebug configuration for docker in mac
zend_extension=xdebug.so
xdebug.idekey = "PHPSTORM"
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=0
xdebug.remote_host=host.docker.internal
xdebug.remote_port=9005
xdebug.remote_autostart=1
xdebug.default_enable=0
xdebug.profiler_aggregate=0
@pthiers
pthiers / xdebug.ini
Created September 3, 2020 15:15
xdebug configuration for docker in linux
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=1
xdebug.remote_port=9001
xdebug.remote_autostart=1
xdebug.remote_host=172.17.0.1
xdebug.idekey=PHPSTORM
xdebug.default_enable=0
xdebug.profiler_aggregate=0
@pthiers
pthiers / allow-port.sh
Last active July 21, 2021 16:42
allow blocked ports in google chrome in linux
sudo sed -i 's/^Exec.*/& --explicitly-allowed-ports=10080/' /usr/share/applications/google-chrome.desktop
@pthiers
pthiers / docker.sh
Created August 3, 2022 15:03
Get list of gateway from docker container for xdebug
docker inspect -f='{{range .NetworkSettings.Networks}}{{println .Gateway}}{{end}}' <container-name>