Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / git-alias.md
Last active June 8, 2025 22:38
Useful Git Alias

Log

git config --global alias.lg "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"

Status

git config --global alias.s status --short

Alternativa útil de status

git config --global alias.s status -sb

@Fhernd
Fhernd / ex191_ocurrencias_elementos_arreglo.js
Created December 3, 2019 11:52
// Ejercicio 191: Contar las ocurrencias de los elementos de un arreglo con forEach.
// Ejercicio 191: Contar las ocurrencias de los elementos de un arreglo con forEach.
// Solución:
let numeros = [1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 6, 7, 8];
let conteo = {};
numeros.forEach((valor) => {
if(conteo[valor]){