Skip to content

Instantly share code, notes, and snippets.

Thiago Duarte tduarte

Block or report user

Report or block tduarte

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tduarte
tduarte / gitcommand.md
Created Oct 14, 2016
When you can't stash a modified file
View gitcommand.md
git ls-files -m | xargs -I {} git update-index --assume-unchanged {}
@tduarte
tduarte / publish-ghpages.md
Last active Nov 6, 2019
If you need to force push an subtree
View publish-ghpages.md
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@tduarte
tduarte / enviar.php
Last active Dec 29, 2015
Script para quem precisa enviar e-mails pelo PHP de forma simples via POST.
View enviar.php
<?php
// Colocar na tag form os seguintes atributos: <form method="post" action="enviar.php">
$para = "destino@dominio.com.br"; // Mudar o e-mail para o destinatário
$assunto = "Formulário de Contato"; // Assunto do E-mail
$mensagem = "<strong>Nome: </strong>".$_POST['posto']; // Campos do formulário. Colocar o equivalente no atributo name do campo.
$mensagem .= "<br><strong>E-mail: </strong>".$_POST['email']; // Campos do formulário. Colocar o equivalente no atributo name do campo.
You can’t perform that action at this time.