Skip to content

Instantly share code, notes, and snippets.

View pablocattaneo's full-sized avatar

Pablo Cattaneo pablocattaneo

View GitHub Profile
@pablocattaneo
pablocattaneo / example.js
Created August 14, 2015 15:36
Code for specific viewport width
if(jQuery(window).width() <= 768 ){
jQuery('.menu-wp-carrefour .tituloNivel3').click(function(event) {
jQuery('.menu-wp-carrefour li').toggle();
});
}
@pablocattaneo
pablocattaneo / vertical-center-img
Last active September 16, 2017 00:15
vertical center image. Centrar verticalmente una imagen
Impletementado por primera vez en el header de http://localhost/presugym/index.php.
@pablocattaneo
pablocattaneo / loading.styl
Last active September 16, 2017 00:14
Loading javascript
.loading
position absolute
background #2a2a2a
z-index 999
height 100%
width 100%
left 0
img
width auto
position absolute
@pablocattaneo
pablocattaneo / get_url_thumb.php
Created August 18, 2015 19:23
Obtiene la url the thumbnail
<?php wp_get_attachment_url( get_post_thumbnail_id($post->ID) )?>
@pablocattaneo
pablocattaneo / aclaracion
Last active September 16, 2017 00:14
Se dispara el evento sólo una vez luego de hacer el resize al browser Just one fire after rize windows browser.
http://stackoverflow.com/questions/2854407/javascript-jquery-window-resize-how-to-fire-after-the-resize-is-completed
CMS's solution is fine if you only call it once, but if you call it multiple times, e.g. if different parts of your code set up separate callbacks to window resizing, then it will fail b/c they share the timer variable.
With this modification, you supply a unique id for each callback, and those unique IDs are used to keep all the timeout events separate.
@pablocattaneo
pablocattaneo / block-slider.html
Created August 26, 2015 18:50
Codigo para los slider (bxslider) para Carrefour. Con los estilos aplicados.
<div id="slider-huella-desktop" class="onlyDesktopBlock__TP">
<div class="slider">
<div>
<img src="{{media url="wysiwyg/huella_natura_tp/huella_natural_slider_1.jpg"}}" alt="" data-image="{{media url="wysiwyg/huella_natura_tp/huella_natural_slider_1.jpg"}}"/>
</div>
<div>
<img src="{{media url="wysiwyg/huella_natura_tp/huella_natural_slider_2.jpg"}}" alt="" data-image="{{media url="wysiwyg/huella_natura_tp/huella_natural_slider_2.jpg"}}"/>
</div>
</div>
</div>
@pablocattaneo
pablocattaneo / new_gist_file.css
Created September 4, 2015 00:30
sombra de un sólo lado. http://stackoverflow.com/questions/5115427/how-can-i-add-a-box-shadow-on-one-side-of-an-element Yes, you can use the shadow spread property of the box-shadow rule: The fourth property there -2px is the shadow spread, you can use it to change the spread of the shadow, making it appear that the shadow is on one side only. T…
.wrapperLogoHeader {
border-right: 1px solid #333;
box-shadow: 6px 0 5px -2px #333;
}
@pablocattaneo
pablocattaneo / Custom breadcrumb.xml
Last active September 16, 2017 00:13
Custom breadcrumb. Para usarlo se debe ingresar al página cms en el administrador de Magento e ir a la sección Diseño > Actualización diseño personalizado XML More info: http://stackoverflow.com/questions/3516049/creating-child-cms-pages-in-magento
<reference name="root">
<action method="unsetChild"><alias>breadcrumbs</alias></action>
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs">
<action method="addCrumb">
<crumbName>Inicio</crumbName>
<crumbInfo><label>Inicio</label><title>Inicio</title><link>/</link></crumbInfo>
</action>
<action method="addCrumb">
<crumbName>Huella Natural</crumbName>
<crumbInfo><label>Huella Natural</label><title>Huella Natural</title><link>/huellas/</link></crumbInfo>
You can send mail from localhost with sendmail package , sendmail package is inbuild in XAMPP. So if you are using XAMPP then you can easily send mail from localhost.
for example you can configure C:\xampp\php\php.ini and c:\xampp\sendmail\sendmail.ini for gmail to send mail.
in C:\xampp\php\php.ini find extension=php_openssl.dll and remove the semicolon from the beginning of that line to make SSL working for gmail for localhost.
in php.ini file find [mail function] and change
SMTP=smtp.gmail.com
smtp_port=587
@pablocattaneo
pablocattaneo / base_url_cms_pages.html
Created September 22, 2015 15:07
Base url cms pages.
<a href="{{store url=""}}content/recetas/" class="button btn_recetas">RECETAS</a>