Skip to content

Instantly share code, notes, and snippets.

View JoshuaFrontEnd's full-sized avatar
🎯
Focusing

Joshua Torres JoshuaFrontEnd

🎯
Focusing
View GitHub Profile
@JoshuaFrontEnd
JoshuaFrontEnd / emularMediaQuerie.js
Created February 12, 2018 02:17
Funcion que permite ejecutar funciones dependiendo del ancho de la ventana emulando el comportamiento de las media queries de CSS al hacer resize
(function (window, document, undefined) {
'use strict';
// Initialize the media query
var mediaQuery = window.matchMedia('(min-width: 560px)');
// Add a listen event
mediaQuery.addListener(doSomething);
// Function to do something with the media query
@JoshuaFrontEnd
JoshuaFrontEnd / centrarConFlex.css
Created February 8, 2018 13:29
Centrar cualquier elemento hijo en posición vertical y horizontal en CSS con flexbox, aplicar clase css al contenedor
.centerFlex {
display: flex;
justify-content: center;
align-items: center;
}
@JoshuaFrontEnd
JoshuaFrontEnd / centrarConTransform.css
Last active February 8, 2018 13:26
Centrar cualquier elemento en posición horizontal y vertical en CSS con transform y posición absoluta
.centrado-porcentual {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
@JoshuaFrontEnd
JoshuaFrontEnd / aliasGit.txt
Last active January 15, 2018 14:04
Alias para git log y git status
git log
git config --global alias.lg "log --oneline --decorate --all --graph"
git lg
git status
git config --global alias.s "status -s -b"
git s