To be completed...
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
- Remove PHP completely | |
sudo apt-get purge 'php*' | |
- Install PHP 8.0 Debian/Ubuntu | |
sudo apt update | |
sudo apt install lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 | |
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list | |
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add - | |
sudo apt update | |
sudo apt install php8.0 -y |
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 | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Support\Arr; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
// ... |
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
WSL 2 | |
docker run --rm -v /$(pwd):/app composer create-project laravel/laravel nome_do_projeto | |
GIT BASH | |
docker run --rm -v /$(pwd):/app composer create-project laravel/laravel nome_do_projeto | |
ou | |
docker run --rm -v ${PWD}:/app composer create-project laravel/laravel nome_do_projeto |
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
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
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
# criar diretório do projeto em /var/www (exemplo: /var/www/teste.testandoapi.click) | |
# instalar os certificados SSL com o certbot em https://certbot.eff.org/ | |
# usar o comando abaixo trocando apenas o subdomínio para gerar os certificados | |
# sudo certbot certonly --manual -d \*.testandoapi.click --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory | |
# criar subdominio no route 53 da Amazon ou em outro provider e criar um record apontando para o ip da máquina | |
# configurar o nginx usando o arquivo abaixo como exemplo | |
server { | |
listen 80 default_server; |
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/common.php'; | |
// Project name | |
set('application', 'enovate.co.uk'); | |
// Project repository | |
set('repository', 'git@githosting.com:enovatedesign/project.git'); |
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
// Add a 401 response interceptor | |
window.axios.interceptors.response.use(function (response) { | |
return response; | |
}, function (error) { | |
if (401 === error.response.status) { | |
swal({ | |
title: "Session Expired", | |
text: "Your session has expired. Would you like to be redirected to the login page?", | |
type: "warning", | |
showCancelButton: true, |
Este documento contém os links de referência citados na live do canal Full Cycle Ambiente perfeito de Docker com VSCode e WSL2
Para utilizar o Docker no Windows, use este guia de instalação: https://github.com/codeedu/wsl2-docker-quickstart.
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
# Usar verbos para descrever commit. A mensagem do commit deve ser em inglês | |
Exemplo: Add form login | |
Exemplo: Update navbar items | |
Exemplo: Change site title | |
Exemplo: Rename README.txt to README.md | |
# Usar commit pequenos e atômicos | |
Cada commit deve ter de dois a 5 linhas de código alteradas |