curl -fsSL https://gist.githubusercontent.com/muuvmuuv/7b7a911ddec2172375b75498154ce5e8/raw/2d2bef245f9644dae10f8724f784f3424c4e30a2/php-pm.sh | sh
More here: https://tideways.com/profiler/blog/an-introduction-to-php-fpm-tuning
#!/bin/bash | |
# Update package lists | |
sudo apt update | |
# Install zsh | |
sudo apt install -y zsh | |
# Install Oh My Zsh | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
<?php | |
declare(strict_types=1); | |
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector; | |
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector; | |
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector; | |
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector; | |
use Rector\CodeQuality\Rector\FuncCall\SimplifyRegexPatternRector; | |
use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector; |
curl -fsSL https://gist.githubusercontent.com/muuvmuuv/7b7a911ddec2172375b75498154ce5e8/raw/2d2bef245f9644dae10f8724f784f3424c4e30a2/php-pm.sh | sh
More here: https://tideways.com/profiler/blog/an-introduction-to-php-fpm-tuning
<?php | |
trait EnhancedEnum | |
{ | |
/** | |
* Get the enum value from the name. e.g case INVOICE = 'invoice'; will return 'invoice' | |
* | |
* @param string $name | |
* @return static | |
*/ |
#!/usr/bin/env bash | |
NC='\033[0m' # No Color | |
YELLOW='\033[0;33m' | |
CYAN='\033[0;36m' | |
GREEN='\033[0;32m' | |
RED='\033[0;31m' | |
MAGENTA='\033[0;35m' | |
notify_about_actions_required() { | |
changed_files="$(git diff-tree -r --name-status --no-commit-id $1 $2)" |
#!/bin/bash | |
echo '🏃 Starting setup...' | |
echo '--------------------' | |
sudo apt update | |
sudo apt upgrade | |
echo '🐠🚀 Installing Fish and Starship...' |
# This is a sample build configuration for PHP. | |
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples. | |
# Only use spaces to indent your .yml configuration. | |
# ----- | |
# You can specify a custom docker image from Docker Hub as your build environment. | |
image: php:7.4-fpm | |
definitions: | |
services: | |
mysql: |
############ WordPress #################### | |
# Disable logging for favicon and robots.txt | |
location = /favicon.ico { | |
try_files /favicon.ico @empty; | |
access_log off; | |
log_not_found off; | |
expires max; | |
} |
# For phpize | |
apt install php7.3-dev | |
# Install extensions | |
pecl install ev | |
pecl install event | |
# Create configurations | |
sudo echo 'extension=ev.so' > /etc/php/7.3/mods-available/ev.ini | |
sudo echo 'extension=event.so' > /etc/php/7.3/mods-available/event.ini |