Skip to content

Instantly share code, notes, and snippets.

View macghriogair's full-sized avatar

Patrick macghriogair

  • Berlin
View GitHub Profile
@macghriogair
macghriogair / .php-cs-fixer.dist.php
Created December 16, 2021 13:36
[PHP-CS-Fixer Config] #phpcs #php #codestyle
<?php
use PhpCsFixer\Finder;
use PhpCsFixer\Config;
$finder = Finder::create()
->in([
__DIR__ . '/',
])
->ignoreDotFiles(true)
<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@macghriogair
macghriogair / docker-compose.yml
Last active January 26, 2021 11:50
[Matomo bitnami docker] #matomo #analytics #docker
# Kudos: https://github.com/bitnami/bitnami-docker-matomo
version: "2"
services:
mariadb:
image: "docker.io/bitnami/mariadb:10.3-debian-10"
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_matomo
- MARIADB_DATABASE=bitnami_matomo
# Flag necessary for the database max allowed packet check
@macghriogair
macghriogair / bashscript.sh
Last active March 9, 2020 08:45
[Install PHP 7.4 Ubuntu 18.04+] #php-7.4
# Add ppa
sudo apt-get update
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
# Install PHP + extensions
apt-get install php-igbinary
@macghriogair
macghriogair / readme.md
Last active January 16, 2020 10:24
[Nginx php-fpm optimization]

PHP-FPM

pm = dynamic
pm.max_children = 100
pm.start_servers = 25
pm.min_spare_servers = 5
pm.max_spare_servers = 50
pm.max_requests = 500
@macghriogair
macghriogair / cheatsheet.md
Last active November 6, 2020 15:56
[Beanstalkd cli interaction] #beanstalkd
@macghriogair
macghriogair / patch-phpunit-report.py
Last active July 22, 2020 18:41
[patch PHPUnit XML report for sonarqube] #phpunit #sonarqube
#!/usr/bin/env python
# coding: utf-8
import sys
import xml.etree.ElementTree as ET
report_file_path = 'project/tests/_output/report.xml'
if (len(sys.argv) > 1):
@macghriogair
macghriogair / bash.sh
Last active November 15, 2021 15:54
[Xdebug cli command in docker with PHPStorm ] #xdebug #docker
export XDEBUG_MODE=develop,debug
export PHP_IDE_CONFIG="serverName=php-docker.local"
@macghriogair
macghriogair / ApiContextBase.php
Created May 17, 2019 08:51
[Behat API Context] #guzzle #behat
<?php
namespace Tests\Behat;
use Behat\Behat\Context\ClosuredContextInterface;
use Behat\Behat\Context\TranslatedContextInterface;
use Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\MinkExtension\Context\RawMinkContext;
@macghriogair
macghriogair / InteractsWithMail.php
Created May 14, 2019 10:03
[mailcatcher integration test helper] #mailcatcher #mailhog #testing
<?php
namespace Tests;
use GuzzleHttp\Client as Client;
trait InteractsWithMail
{
/**
* @var \GuzzleHttp\Client