title: Setting Up Laravel in Ubuntu / DigitalOcean keywords: servers, laravel, coderstape, coder's tape description: Let's take a look at settting up a server from scratch for Laravel. date: April 1, 2019 tags: servers, laravel permalink: setting-up-laravel-in-ubuntu-digitalocean img: https://coderstape.com/storage/uploads/GZTXUbyGum2xeUZM9qBD5aPv8EKLwG3C8RGcRon4.jpeg author: Victor Gonzalez authorlink: https://github.com/vicgonvt
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 | |
| // Make sure the PCNTL extension is available | |
| if (!function_exists('pcntl_fork')) { | |
| die("PCNTL functions not available. Please install the PCNTL extension.\n"); | |
| } | |
| // Create a temp directory for process communication | |
| $tempDir = sys_get_temp_dir() . '/pcntl_' . uniqid(); | |
| mkdir($tempDir, 0755, true); |
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 | |
| /** | |
| * Class PIIMasker | |
| * | |
| * This class provides methods to mask or anonymize Personally Identifiable Information (PII). | |
| * Masking involves partial replacement for readability, while anonymization uses hashing for irreversibility. | |
| * It's recommended to use anonymization for storing data securely. | |
| */ | |
| class PIIMasker |
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/sh | |
| set -e | |
| vendor/bin/phpunit | |
| (git push) || true | |
| git checkout production | |
| git merge master |
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
| name: Laravel Vapor CD | |
| on: | |
| release: | |
| types: [ published, deleted ] | |
| branches: | |
| - master | |
| jobs: | |
| deploy_release: | |
| runs-on: ubuntu-20.04 |
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
| name: Preview Environment | |
| on: | |
| pull_request: | |
| types: [opened] | |
| env: | |
| FORGE_API_TOKEN: ${{ secrets.FORGE_API_TOKEN }} | |
| FORGE_SERVER_ID: ${{ secrets.FORGE_SERVER_ID }} |
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 | |
| function quadraticRegression($dataPoints) { | |
| $sumX = 0; | |
| $sumX2 = 0; | |
| $sumX3 = 0; | |
| $sumX4 = 0; | |
| $sumY = 0; | |
| $sumXY = 0; | |
| $sumX2Y = 0; | |
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 | |
| function polyfit($dependentValues, $independentValues, $countOfElements, $order, &$coefficients) | |
| { | |
| // Declarations... | |
| // ---------------------------------- | |
| $maxOrder = 5; | |
| $B = array_fill(0, $maxOrder + 1, 0.0); | |
| $P = array_fill(0, (2 * ($maxOrder + 1)) + 1, 0.0); | |
| $A = array_fill(0, (2 * ($maxOrder + 1)) * ($maxOrder + 1), 0.0); |
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
| name: '[PROJECT NAME]' | |
| 'on': | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| - 'releases/**' | |
| pull_request: null | |
| env: | |
| working_directory: ./application |
NewerOlder