Skip to content

Instantly share code, notes, and snippets.

View tduarte's full-sized avatar

Thiago Duarte tduarte

View GitHub Profile
@tduarte
tduarte / enviar.php
Last active December 29, 2015 11:19
Script para quem precisa enviar e-mails pelo PHP de forma simples via POST.
<?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.
@tduarte
tduarte / publish-ghpages.md
Last active March 15, 2024 05:45
If you need to force push an subtree
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 / gitcommand.md
Created October 14, 2016 19:23
When you can't stash a modified file
git ls-files -m | xargs -I {} git update-index --assume-unchanged {}