Skip to content

Instantly share code, notes, and snippets.

@mfyance
mfyance / grid.css
Created October 1, 2020 21:56
Grids
/*
* Grids
* @author mfyance
*/
.row-fluid{
margin-left: -10px;
margin-right: -10px;
}
.row {
margin-left: -10px;
@mfyance
mfyance / clearInterval.js
Created December 14, 2018 20:25
Limpiar tiempo de ClearInterval
(function(w){w = w || window; var i = w.setInterval(function(){},100000); while(i>=0) { w.clearInterval(i--); }})(/*window*/);
@mfyance
mfyance / config.php
Created July 24, 2018 23:30
Configurar Path General
<?php
$port = ($_SERVER['SERVER_PORT'] != "" ) ? ":" : "";
$server2 = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://". $_SERVER['SERVER_NAME'].$port.$_SERVER['SERVER_PORT'].dirname($_SERVER["REQUEST_URI"].'?');
$server = rtrim($server2, "/busqueda");
$localhost = (strlen($server)-1);
return [
'pathServer' => ($server[$localhost] == "/") ? $server : $server."/",
@mfyance
mfyance / scroll.js
Created May 4, 2018 01:36
Detectar Dirección del Scroll
$(document.body).on('DOMMouseScroll mousewheel', function (e) {
if (e.originalEvent.detail > 0 || e.originalEvent.wheelDelta < 0) {
// down
} else {
// up
}
@mfyance
mfyance / git.merge
Last active April 27, 2018 03:15
Winmerge Git
[merge]
tool = winmerge
[mergetool "winmerge"]
cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" "$PWD/$LOCAL" "$PWD/$REMOTE" "$PWD/$MERGED"
trustExitCode = false
keepBackup = false
[diff]
tool = winmerge
@mfyance
mfyance / git.merge
Created April 27, 2018 03:14
Winmerge Git
[merge]
tool = winmerge
[mergetool "winmerge"]
cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" "$PWD/$LOCAL" "$PWD/$REMOTE" "$PWD/$MERGED"
trustExitCode = false
keepBackup = false
[diff]
tool = winmerge
@mfyance
mfyance / git.config
Created March 26, 2018 23:18
GIT: Configuración Personalizada
[alias]
st = status
ck = checkout
p1om = pull origin master
p2om = push origin master
p1og = pull origin gestion
p2og = push origin gestion
cm = commit -am
[merge]
tool = winmerge
@mfyance
mfyance / letters.js
Created March 9, 2018 17:53
Letters Animation
// Animation 1
$(".title").lettering();
$('.button').click(function() {
animation();
});
function animation() {
var title1 = new TimelineMax();
title1.to(".button", 0, {visibility: 'hidden', opacity: 0})
title1.staggerFromTo(".title span", 0.5,
@mfyance
mfyance / grid.css
Last active March 7, 2018 16:42
GRID - FLEXBOX
.grid__container {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
margin: 0 -10px 30px 0px;
}
.grid__item {
flex: 0 1 23%;
@mfyance
mfyance / flatpickr.js
Created August 31, 2017 21:34
flatpickr - Agregar nuevo parámetro en su config
var calendar = document.querySelector("#fechaFin")._flatpickr;
calendar.set("minDate", $scope.oData.strFechaFin);
// Otra forma de agregar un parámetro en el config del datepicker
calendar.config.minDate = $scope.oData.strFechaFin;