Skip to content

Instantly share code, notes, and snippets.

View tiagofrancafernandes's full-sized avatar
😊
Loved by Jesus Christ. PHP/Laravel developer; Linux user; Open-source maker;

Tiago França tiagofrancafernandes

😊
Loved by Jesus Christ. PHP/Laravel developer; Linux user; Open-source maker;
View GitHub Profile
@tiagofrancafernandes
tiagofrancafernandes / gitignore_per_git_branch.md
Last active January 2, 2020 15:35 — forked from wizioo/gitignore_per_git_branch.md
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@tiagofrancafernandes
tiagofrancafernandes / conteudos_sobre_gist.md
Last active March 20, 2021 21:08
Conteúdos sobre GIST visto durante a gravação do vídeo
@tiagofrancafernandes
tiagofrancafernandes / ExecTimeTrack-readme.md
Last active March 30, 2024 04:14
dev-laravel_snippets | snippets Laravel #devlaravel_snippets #/devlaravel_snippets #laravel
//nos snippets tem o arquivo: ExecTimeTrack.php
//Rastrear pontos da aplicação que demoram mais tempo
$timer = new ExecTimeTrack('aaa');
$timer->startCheckpointToList('validacao');
sleep(1);
$timer->endCheckpointToList('validacao');

dd($timer->getCheckpointList());
@tiagofrancafernandes
tiagofrancafernandes / curl-post-com-autenticacao-basica.sh
Last active May 31, 2023 03:15
Assets, API, CURL, JS Fetch, etc
#curl POST com dados via JSON com autenticação básica
curl -X POST -u teste1:123 \
-H "Content-Type: application/json" \
-d '{"username":"abc","password":"abc"}' \
http://localhost:5678/webhook-test/create_account-start
@tiagofrancafernandes
tiagofrancafernandes / README.md
Last active September 2, 2021 19:04
Count ratings in PHP

Count ratings in PHP

How to use

$ratings    = [10,5,7,2];
$max_rating = 10;

//Rating with representation
$rating         = getRatings($ratings, $max_rating, true);
@tiagofrancafernandes
tiagofrancafernandes / linux_bashrc_git.sh
Last active September 3, 2022 14:47
PS1 with GIT BASH
https://gist.github.com/tiagofrancafernandes/0ddbed3f8f30bf2aeb9f211a6d468636
@tiagofrancafernandes
tiagofrancafernandes / alpine-fade-transition.html
Last active June 26, 2023 01:58
dev-alpinejs_transitions_snippets
<!--
https://codepen.io/tiagofranca/pen/BaZpzrN
https://jsfiddle.net/TiagoFranca/c1gL598j/
-->
<style>
[x-cloak] {display: none !important;}
.transition-500ms, .transition {
-webkit-transition: opacity 0.5s ease-in-out;
-moz-transition: opacity 0.5s ease-in-out;
-ms-transition: opacity 0.5s ease-in-out;
@tiagofrancafernandes
tiagofrancafernandes / change-commit-date.sh
Last active January 11, 2024 12:21
dev-git_snippets - tips and more
change commit date linux
# First: Commit your message normally.
# Second: then run
GIT_COMMITTER_DATE="Mon Feb 28 14:35:42 2022 -0300" git commit --amend --no-edit --date "Mon Feb 28 14:35:42 2022 -0300"
#This will changed the date of the last commit
# php:
# (new DateTime('2022-02-28 14:35:42'))->format('D M d H:i:s Y -0300')