Skip to content

Instantly share code, notes, and snippets.

View luisfdeandrade's full-sized avatar

Luís Felipe de Andrade luisfdeandrade

View GitHub Profile
@luisfdeandrade
luisfdeandrade / gist:8578144
Created January 23, 2014 13:04
Mensagem validação custom post type
function save_post_representante() {
......
$representante = get_post($clientes[$cliente]);
$erro = 'O cliente "<strong> '. $representante->post_title. '</strong> " já está cadastrado para o representante "'. $post->post_title.'" ';
} set_transient( get_current_user_id().'missingfield', $erro );
function representante_validacao() {
if($out = get_transient( get_current_user_id().'missingfield' ) ) {
delete_transient( get_current_user_id().'missingfield' );
@luisfdeandrade
luisfdeandrade / gist:a8a99cb75ce4361ee003
Created February 15, 2016 16:01
Remove big files on GIT
git rev-list --all --objects | \
sed -n $(git rev-list --objects --all | \
cut -f1 -d' ' | \
git cat-file --batch-check | \
grep blob | \
sort -n -k 3 | \
tail -n40 | \
while read hash type size; do
echo -n "-e s/$hash/$size/p ";
done) | \