Skip to content

Instantly share code, notes, and snippets.

View davidnaviaweb's full-sized avatar

David Navia davidnaviaweb

View GitHub Profile
@davidnaviaweb
davidnaviaweb / .gitconfig
Created September 6, 2019 12:41
A bunch of useful git shorthand commands.
## Logs ##
# pretty log #
l = log --pretty=format:"%C(Yellow)%H\\ %C(reset)%ad\\ %C(Green)%cr%C(reset)%x09\\ %Cred%d\\ %C(Cyan)%an:\\ %C(reset)%s" --decorate --date=format:%c
# tree log #
lg = log --graph --oneline --decorate --all
## Add ##
# add #
a = add
# add all indexed modified files #
@davidnaviaweb
davidnaviaweb / .gitconfig
Last active October 11, 2018 08:41
Git aliases for .gitconfig
[alias]
# logs
l = log --pretty=format:"%C(Yellow)%H\\ %C(reset)%ad\\ %C(Green)%cr%C(reset)%x09\\ %Cred%d\\ %C(Cyan)%an:\\ %C(reset)%s" --decorate --date=format:%c
lg= log --graph --oneline --decorate --all
# add
a = add
au = add -u
ap = add -p
aa = add .
@davidnaviaweb
davidnaviaweb / .gitconfig
Last active October 11, 2018 08:26
First part of .gitconfig
[push]
default = simple
[user]
email = davidnaviamatas@gmail.com
name = David Navia
@davidnaviaweb
davidnaviaweb / .bash_profile
Created October 11, 2018 08:21
Git alias for .bash_profile
# ----------------------
# Git Aliases
# ----------------------
alias g='git'
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
@davidnaviaweb
davidnaviaweb / functions.php
Created October 1, 2016 09:57
WordPress Dashboard tips & tricks @ WC Sevilla 2016
<?php
/**
* Mostrar / Ocultar Admin Bar
*
* Según el Codex, basta retornar el valor 'false' en la función 'show_admin_bar' para ocultar
* la barra de administración. Sin embargo, esta implementación parece que no funciona correctamente.
*
*/
function remove_admin_bar($show_admin_bar)
{