Skip to content

Instantly share code, notes, and snippets.

Avatar
🤯
Boum Headshot! Boum Headshot! Boum Headshot!!!

Antoine B. abenevaut

🤯
Boum Headshot! Boum Headshot! Boum Headshot!!!
View GitHub Profile
@abenevaut
abenevaut / circleci-config.yml
Created July 15, 2022 15:20
Parallelized jobs workflow and "test" job parallelized
View circleci-config.yml
version: 2
workdir-latest: &workdir-latest
working_directory: ~/project/latest
docker-latest: &docker-latest
docker:
- image: abenevaut/vapor-ci:node_16-php_81
checkout: &checkout
@abenevaut
abenevaut / circleci-config.yml
Last active August 7, 2022 11:08
Standard circleci workflow
View circleci-config.yml
version: 2
jobs:
test:
docker:
- image: abenevaut/vapor-ci:node_16-php_81
steps:
- checkout
@abenevaut
abenevaut / entrypoint.sh
Created July 6, 2022 15:49
Vapor Dockerfile with newrelic
View entrypoint.sh
#! /bin/sh
# Start Newrelic daemon
newrelic-daemon -c /usr/local/etc/newrelic/newrelic.cfg
# Start PHP
/opt/bootstrap
newrelic_background_job(false);
@abenevaut
abenevaut / ext-xdebug.ini
Created February 19, 2022 23:54
xDebug PHP 8.0 with PHPStorm comme un pro
View ext-xdebug.ini
// /usr/local/etc/php/8.0/conf.d/ext-xdebug.ini
zend_extension=xdebug.so
xdebug.mode=develop,debug,coverage
xdebug.start_with_request=yes
xdebug.discover_client_host=0
xdebug.client_host=127.0.0.1
View mysql_copy_database_to_database.sh
mysqldump -h 127.0.0.1 -P 3306 --user=root --password="" db_1 | mysql -h 127.0.0.1 -P 3306 --user=root --password="" -C db_2
@abenevaut
abenevaut / ext-xdebug.ini
Created November 23, 2020 19:46
xDebug with PHPStorm comme un pro
View ext-xdebug.ini
// /usr/local/etc/php/7.4/conf.d/ext-xdebug.ini
zend_extension=xdebug.so
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_port=9001
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1
xdebug.idekey=PHPSTORM
xdebug.show_error_trace=1
@abenevaut
abenevaut / .gitignore_global.sh
Created November 12, 2020 08:20
.gitignore_global file
View .gitignore_global.sh
# ask terminal to get global gitignore `git config --global core.excludesfile`
# set a custom global ignore file `git config --global core.excludesfile ~/.gitignore_global`
*~
.DS_Store
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
@abenevaut
abenevaut / find-php-ext-version.sh
Created June 19, 2020 07:12
Find gd, imagick and json php extension revision.
View find-php-ext-version.sh
php -i | grep 'GD\|ImageMagick\|json'
@abenevaut
abenevaut / install-php_7.4.0.sh
Last active November 18, 2022 18:05
Install phpbrew && php 7.4.0 on macOS
View install-php_7.4.0.sh
xcode-select --install
# You should install brew https://brew.sh/index_fr
brew install automake autoconf curl pcre bison re2c mhash libtool icu4c gettext jpeg openssl libxml2 mcrypt gd gmp libevent zlib libzip bzip2 imagemagick pkg-config oniguruma
brew link --force icu4c
brew link --force openssl
brew link --force libxml2
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
chmod +x phpbrew
@abenevaut
abenevaut / install-nginx-with-phpbrew.sh
Last active December 22, 2020 08:43
Install brew nginx with phpbrew php-fpm 7.3.10 on macOS (this installation allows to run nginx and php-fpm (from phpbrew) as root but chrooted with the current user - take care if there is multiple developper account on mac, that will potentially make trouble between accounts).
View install-nginx-with-phpbrew.sh
// First follow https://gist.github.com/abenevaut/fd21704ead845e5bc14ca93fa8d0a18f but modify the line 17 like follow
// add +fpm to compile php-fpm
phpbrew --debug install php-7.3.10 +gd +default +sqlite +mysql +fpm +bz2=/usr/local/Cellar/bzip2/1.0.6_1/ +zlib=/usr/local/Cellar/zlib/1.2.11/ -- --with-gd=shared
brew install nginx
sudo emacs /usr/local/etc/nginx/nginx.conf
sudo emacs /Users/YOUR_MACOS_USERNAME/.phpbrew/php/php-7.1.29/etc/php-fpm.d/www.conf
// In previous config files, we set user and group to run nginx and php-fpm as setted user and user group (logic)..