This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use App\Kernel; | |
| require __DIR__.'/vendor/autoload_runtime.php'; | |
| use Symfony\Component\Console\Output\StreamOutput; | |
| use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
| use Symfony\Component\DependencyInjection\ContainerBuilder; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| const STREAM_OPEN_FOR_INCLUDE = 128; | |
| final class HardCoreDebugLogger | |
| { | |
| public static function register(string $output = 'php://stdout') | |
| { | |
| register_tick_function(function () use ($output) { | |
| $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script requires jq, a command line to to parse and format JSon. | |
| # https://stedolan.github.io/jq/ | |
| function padBase64 { | |
| STR=$1 | |
| MOD=$((${#STR}%4)) | |
| if [ $MOD -eq 1 ]; then | |
| STR="${STR}=" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Docker-Compose shortcut: | |
| # - before: docker-compose exec app <command> | |
| # - after: d <command> | |
| # The alias will auto-start the service if it is stopped. | |
| # Requirements: | |
| # - jq: https://stedolan.github.io/jq/ | |
| # - yq: https://github.com/kislyuk/yq | |
| # Add this to your `~/.zshrc` at the end because `d` is an existing (unrelated) alias we want to override |
WordPress is popular because it's easy to setup without much technical know-how. However, to build a more robust PHP project with command line deployments, updates and ongoing maintenance, working with WordPress out-of-the-box raises specific challenges:
- How can we make our WordPress projects portable between developers?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace OpenObjects\Bundle\CoreBundle\Service; | |
| use Symfony\Component\Form\Extension\Validator\ViolationMapper\ViolationMapper; | |
| use Symfony\Component\Form\Form; | |
| use Symfony\Component\Form\FormError; | |
| use Symfony\Component\Validator\ConstraintViolation; | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ########################################## | |
| # To run: | |
| # curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x | |
| ########################################## | |
| # Check that HTTPS transport is available to APT | |
| if [ ! -e /usr/lib/apt/methods/https ]; then | |
| sudo apt-get update | |
| sudo apt-get install -y apt-transport-https | |
| fi |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
NewerOlder