This file contains 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 Deployer; | |
require 'recipe/laravel.php'; | |
// Configuration | |
set('ssh_type', 'native'); | |
set('ssh_multiplexing', true); | |
set('git_tty', true); // [Optional] Allocate tty for git on first deployment |
This file contains 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
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
sudo echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list | |
sudo su -c "echo 'deb https://packages.sury.org/php/ $(lsb_release -sc) main' > /etc/apt/sources.list.d/php.list" |
This file contains 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 App\Console\Commands; | |
use App\Models\Course; | |
use App\Models\StudyGroup; | |
use App\Models\Teacher; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; |
This file contains 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 --merged >/tmp/merged-branches && vi /tmp/merged-branches && xargs git branch -d </tmp/merged-branches |
This file contains 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 | |
$connection = new PDO("mysql:host=$host;dbname=$dbname", $user, $password); | |
$statement = $connection->prepare("INSERT INTO table (col1, col2, col3) VALUES (?, ?, ?)"); | |
$statement->bindParam(1, "value1"); | |
$statement->bindParam(2, "value2"); | |
$statement->bindParam(3, "value3"); |