A Pen by Rafa Poveda on CodePen.
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
.htaccess | |
wp-content/uploads/ | |
wp-content/blogs.dir/ | |
wp-content/upgrade/ | |
wp-content/backup-db/ | |
wp-content/advanced-cache.php | |
wp-content/wp-cache-config.php | |
sitemap.xml | |
*.log | |
wp-content/cache/ |
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
window.onload = function () { | |
document.getElementById("commentform").onkeydown = function (e) { | |
if (e.keyCode == 13 && e.ctrlKey) { // keyCode 13 is Enter | |
document.getElementById("submit").click(); // submit the form by hitting ctrl + enter | |
// alert(e.keyCode); // to know other keyCodes of each keys | |
return false; // preventing default action | |
} | |
if (e.keyCode == 13 && e.metaKey) { // keyCode 13 is Enter | |
document.getElementById("submit").click(); // submit the form by hitting cmd + enter | |
// alert('test'); // to know other keyCodes of each keys |
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 | |
$contador = $_GET['c']; | |
// we can use any top number we need | |
if ( $contador >= 100 ) { | |
echo 'script terminado'; | |
} else { | |
if ( $contador == '' ) | |
$contador = 0; |
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
<script> | |
/* Desactivamos el primer panel, y activamos el segundo */ | |
jQuery( document ).ready(function() { | |
jQuery('.tab').eq(0).removeClass('active'); | |
jQuery('.panel').eq(0).removeClass('active'); | |
jQuery('.tab').eq(1).addClass('active'); | |
jQuery('.panel').eq(1).addClass('active'); | |
console.log('terminado'); | |
}); | |
</script> |
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
sh /home/raven/cronjob.sh > /dev/null 2>&1 | |
sh /home/raven/mysqljob.sh > /dev/null 2>&1 |
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
#!/bin/sh | |
cd ~/domains/bi0xid.es/public_html/web/ | |
git add --all | |
git commit -m "copia de seguridad" | |
git push origin master | |
cd ~/domains/darkblue.es/public_html/web/ | |
git add --all | |
git commit -m "copia de seguridad" |
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
mysqldump --single-transaction --user=XXXX --password=XXXX --databases XXXX > /home/raven/backup/incremental/XXXX-$(date +%Y%m%d-%H%M).sql | |
mysqldump --single-transaction --user=XXXX --password=XXXX --databases XXXX > /home/raven/backup/incremental/XXXX-$(date +%Y%m%d-%H%M).sql |
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
mysql -u usuario -pcontraseña base_de_datos < archivo_copia_de_seguridad.sql |
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
mysqldump --single-transaction --user=XXXX --password=XXXX --databases XXXX --ignore-table=wp_options > /home/raven/backup/incremental/XXXX-$(date +%Y%m%d-%H%M).sql | |
mysqldump --single-transaction --user=XXXX --password=XXXX --databases XXXX wp_commentmeta wp_comments wp_postmeta wp_posts wp_term_relationships wp_term_taxonomy wp_terms > /home/raven/backup/incremental/XXXX-$(date +%Y%m%d-%H%M).sql | |