Skip to content

Instantly share code, notes, and snippets.

View henryavila's full-sized avatar
💭
Knowledge is power

Henry Ávila henryavila

💭
Knowledge is power
View GitHub Profile
@henryavila
henryavila / fix_authenticity_of_github_problem.md
Created June 24, 2022 19:51 — forked from vikpe/fix_authenticity_of_github_problem.md
FIX: The authenticity of host github.com can't be established.

Error

The authenticity of host 'github.com (140.82.113.4)' can't be established.

Fix

ssh-keyscan github.com >> ~/.ssh/known_hosts
@henryavila
henryavila / UuidModel.php
Created February 8, 2021 10:19 — forked from danb-humaan/UuidModel.php
Trait for implementing UUIDs in Laravel models
<?php
namespace App\Traits;
use Rhumsaa\Uuid\Uuid;
use Illuminate\Database\Eloquent\ModelNotFoundException;
/**
* Trait UuidModel
* @package App\Traits
@henryavila
henryavila / validar_cpf.php
Created February 7, 2020 13:56 — forked from rafael-neri/validar_cpf.php
Validar CPF em PHP (Completo)
<?php
function validaCPF($cpf) {
// Extrai somente os números
$cpf = preg_replace( '/[^0-9]/is', '', $cpf );
// Verifica se foi informado todos os digitos corretamente
if (strlen($cpf) != 11) {
return false;