Author: alexeymezenin
Github:laravel-best-practices
It's not a Laravel adaptation of SOLID principles, patterns etc. Here you'll find the best practices which are usually ignored in real life Laravel projects.
| <?php | |
| /* | |
| Plugin Name: Instrument Hooks for WordPress | |
| Plugin URI: http://bueltge.de/ | |
| Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook after add get-params <code>?instrument=hooks</code>. | |
| Version: 0.0.1 | |
| Author: Frank Bültge | |
| Author URI: http://bueltge.de/ | |
| */ |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
| #!/usr/bin/env bash | |
| # | |
| # Author: Stefan Buck | |
| # License: MIT | |
| # https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
| # | |
| # | |
| # This script accepts the following parameters: | |
| # | |
| # * owner |
| aws route53 wait resource-record-sets-changed --id \ | |
| $(aws route53 change-resource-record-sets --hosted-zone-id \ | |
| "$(aws route53 list-hosted-zones-by-name --dns-name $2. \ | |
| --query HostedZones[0].Id --output text)" \ | |
| --query ChangeInfo.Id \ | |
| --output text \ | |
| --change-batch "{ \ | |
| \"Changes\": [{ \ | |
| \"Action\": \"$1\", \ | |
| \"ResourceRecordSet\": { \ |
Author: alexeymezenin
Github:laravel-best-practices
It's not a Laravel adaptation of SOLID principles, patterns etc. Here you'll find the best practices which are usually ignored in real life Laravel projects.
| <?php | |
| use PhpCsFixer\Config; | |
| use PhpCsFixer\Finder; | |
| $rules = [ | |
| 'array_syntax' => ['syntax' => 'short'], | |
| 'binary_operator_spaces' => [ | |
| 'default' => 'single_space', | |
| 'operators' => ['=>' => null] |
| <?php | |
| /* | |
| * Deleting users, from a file that is just a one-column, \n separated. list of ids | |
| Useing the | |
| _ _ _ | |
| (_) (_) | | |
| ___ _ __ _ _ __ ___ ___ _| |_ | |
| / __| '_ \| | '_ \ / _ \___| | __| | |
| \__ \ | | | | |_) | __/ | | |_ | |
| |___/_| |_|_| .__/ \___| |_|\__| API |
| # Mysql Parameters | |
| MYSQL_ROOT_PASSWORD=secret | |
| MYSQL_DATABASE=snipedocker | |
| MYSQL_USER=root | |
| MYSQL_PASSWORD=secret | |
| # Email Parameters | |
| # - the hostname/IP address of your mailserver | |
| MAIL_PORT_587_TCP_ADDR=smtp.example.com | |
| #the port for the mailserver (probably 587, could be another) |