Skip to content

Instantly share code, notes, and snippets.

<?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class CauseRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
@elton-fonseca
elton-fonseca / Envoy.blade.php
Last active March 19, 2023 21:09
Simple Envoy script for Laravel deploy
@servers(['web' => 'username@hostname'])
@setup
$path = '/var/www/html'
@endsetup
@story('deploy')
git
composer
config
@elton-fonseca
elton-fonseca / docker-commands.txt
Last active November 27, 2019 19:02
Basic Docker commands
# Informations about docker versions
docker version
# Informations about docker
docker info
# See images
docker image ls
# Manager images
@elton-fonseca
elton-fonseca / remove-git-history.md
Created August 21, 2020 11:07
How remove git history

How remove git history

First clone project with depth, where X is commit quantity:

git clone repository-path --depth x

After define de first commit in .git/info/grafts file:

@elton-fonseca
elton-fonseca / validacao.php
Created October 8, 2020 12:32
Atributos também conhecidos como annotations no PHP 8
<?php
class Carro
{
#[Validacao('max', 110)]
public int $velocidade;
}
#[Attribute]
class Validacao{
@elton-fonseca
elton-fonseca / horarios_professor.js
Last active March 23, 2023 17:58
Script para buscar horários de um professor na escola de Inglês ECC
/* Presencial */
let professorProcurado = 'GABRIEL LOPES PAULO';
let dias = document.getElementById('DataPlanilhaMarcacaoId').options;
for(var i = 0; i < dias.length; i++){
let formData = new FormData();
formData.append('StatusPlanilhaId', dias[i].value);
formData.append('AulaWeb', 'true');