Skip to content

Instantly share code, notes, and snippets.

Hector Asencio cranca

View GitHub Profile
@cranca
cranca / actualiza_wordpress_urls.txt
Last active Apr 23, 2018
Plantilla de comandos para cambiar las URL de una BBDD de WordPress
View actualiza_wordpress_urls.txt
UPDATE wp_options SET option_value = replace(option_value, 'http://oldurl', 'http://newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://oldurl','http://newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://oldurl', 'http://newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://oldurl','http://newurl');
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
@cranca
cranca / wp_mail_smtp.php
Created Apr 12, 2017 — forked from butlerblog/wp_config.php
Configure WordPress wp_mail function to send through SMTP server http://b.utler.co/Y3
View wp_mail_smtp.php
/**
* This function will connect wp_mail to your authenticated
* SMTP server. This improves reliability of wp_mail, and
* avoids many potential problems.
*
* Author: Chad Butler
* Author URI: http://butlerblog.com
*
* For more information and instructions, see:
* http://b.utler.co/Y3
@cranca
cranca / scrollToButtons.js
Last active Jan 11, 2017
Botones para scrollTo a un elemento determinado
View scrollToButtons.js
// http://www.devkit.co/code/26-jquery-animated-scroll-to/
$(".button").click(function(e){
e.preventDefault();
scrollTo(".header");
});
function scrollTo(el){
$("html, body").animate( { scrollTop: $(el).offset().top }, 500);
}
@cranca
cranca / foundation_CLI.md
Last active Sep 1, 2016
Instrucciones básicas para usar Foundation For Emails
View foundation_CLI.md

Instalar

En la terminal:

  $npm install --global foundation-cli

Crear un proyecto de Foundation for Sites

En una nueva carpeta de proyecto:

  $foundation new 
@cranca
cranca / utilidades.css
Last active Aug 31, 2016
Libreria de utilidades para maquetar
View utilidades.css
/* UTILIDADES
Clases intercambiables
que ayudan a la maquetación
***********************************************************************/
/* FORMAS */
.circular {
border-radius: 50%;
@cranca
cranca / CookieBanner.js
Last active Jul 28, 2016
Adaptación del script de Cookie Assistant
View CookieBanner.js
_cookie_banner_enable_cookies = true;
_cookie_banner_disable_cookies = false;
(function() {
// Localize jQuery variable
var jQuery;
/******** Load jQuery if not present *********/
if (window.jQuery === undefined || window.jQuery.fn.jquery !== '1.7') {
You can’t perform that action at this time.