This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<video width="320" height="240" controls> | |
<source src="movie.mp4" type="video/mp4"> | |
<source src="movie.ogg" type="video/ogg"> | |
Your browser does not support the video tag. | |
</video> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php phpinfo(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc", "$file"], | |
"selector": "source.js" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//sin permiitr espacios | |
var r={'special':/[\W]/g} | |
//con espacios | |
var s={'special':/[^\w^ñ^(á|é|í|ó|ú)^\s^]/g} | |
function valid(o,w){ | |
o.value = o.value.replace(r[w],''); | |
} | |
function validaremos(o,w){ | |
o.value = o.value.replace(s[w],''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd <localdir> | |
git init | |
git add . | |
git commit -m 'message' | |
git remote add origin <url> | |
git push -u origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TIMESTAMPDIFF(YEAR, Campo , CURDATE()) AS age |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE bdtienda; DELIMITER $$ -- inicio DROP PROCEDURE IF EXISTS sp_productoPorCod$$ -- eliminamos si existe un procedimiento con el mismo nombre CREATE PROCEDURE sp_productoPorCod (IN cod INT) -- creamos el procedimiento con un parámetro de entrada BEGIN -- inicio cuerpo procedimiento almacenado DECLARE estadoOfert CHAR(2); -- declaramos una variable local para almacenar el estado de Oferta. /* Hacemos una consulta y el resultado lo almacenamos en la variable declarada*/ SELECT oferta INTO estadoOfert FROM productos WHERE oferta = 'SI' AND codproducto = cod; IF estadoOfert = 'SI' THEN -- si está en oferta elegimos precio_oferta SELECT codproducto, nombreproduc, precio_oferta FROM productos WHERE codproducto = cod; ELSE -- sino el precio_normal SELECT codproducto, nombreproduc, precio_normal FROM productos WHERE codproducto = cod; END IF; END $$ -- fin de cuerpo del procedimiento almacenado DELIMITER ; -- fin call sp_productoPorCod(2); -- llamamos al proced |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git push --all origin |
OlderNewer