Navigation Menu

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 / publish-github-release.sh
Last active October 30, 2023 14:12
Publish last draft releaase on Github on Linux using Github Cli
#The Release must exist as a draft releaase
REPO=repo/name
TAG=$(gh release list -L 1 -R github.com/$REPO | grep -P '^v[0-9\.]+' -o)
gh release edit $TAG --draft=false -R github.com/$REPO
@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;
@henryavila
henryavila / aliases.sh
Last active May 27, 2020 13:20
Collection of bash alias to php developer (git, php, laravel, etc).
#! /bin/bash
### TO ACTIVATE THIS ALIAS, PUT THIS FILE IN: /etc/profile.d/aliases.sh
### AND RUN: source /etc/profile.d/aliases.sh
### YOU CAN RUN THIS COMMAND:
### sudo rm -f /etc/profile.d/aliases.sh; sudo wget --no-cache --no-cookies https://gist.githubusercontent.com/henryavila/f3a5ccd470d250428ef504f610514ecb/raw/5f533285f77f0145f21bca6f8d8abec6199586c8/aliases.sh -O /etc/profile.d/aliases.sh; source /etc/profile.d/aliases.sh
###
###
### BASED ON: https://github.com/laradock/laradock/blob/master/workspace/aliases.sh