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
#Try 'REPAIR TABLE postparsed;' first. | |
DROP TABLE `postparsed`; | |
CREATE TABLE IF NOT EXISTS `postparsed` ( | |
`Postid` int (10) unsigned NOT NULL default '0', | |
`Dateline` int (10) unsigned NOT NULL default '0', | |
`Styleid` smallint (5) unsigned NOT NULL default '0', | |
`Languageid` smallint (5) unsigned NOT NULL default '0', | |
`Hasimages` smallint (6) NOT NULL default '0', | |
`Pagetext_html` medium text, |
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/bash | |
echo '[Create multiple email addresses in Plesk from a text file easily]' | |
echo | |
# ZARZA | A HEAD OF OUR TIME | |
# https://zarza.com | |
FILE='mails.txt' | |
if [ -f $FILE ]; then | |
while read p; do |
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/bash | |
echo '[Start service if it is down]' | |
echo | |
# ZARZA | A HEAD OF OUR TIME | |
# https://zarza.com | |
service=nginx | |
if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 )) | |
then | |
echo "$service is up!" |
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
# Ejemplo 1 | |
SELECT * FROM post AS r1 JOIN (SELECT (RAND() * (SELECT MAX(postid) FROM post)) AS postid) AS r2 WHERE r1.postid >= r2.postid ORDER BY r1.postid ASC LIMIT 10 | |
# Ejemplo 2 | |
SELECT * FROM (SELECT * FROM `comprobantes` WHERE `ind-estado` = 'procesando' OR (`ind-estado` = 'rechazado' AND `respuesta-xml` IS NULL)) AS r1 JOIN (SELECT (RAND() * (SELECT MAX(id) FROM comprobantes)) AS id) AS r2 WHERE r1.id >= r2.id ORDER BY r1.id ASC LIMIT 100 |
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
/** | |
* Cache AJAX-included scripts. | |
*/ | |
$.cachedScript = function (url, options) { | |
options = $.extend( | |
options || {}, { | |
dataType: "script", | |
cache: true, | |
url: url | |
} |
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 admin -p`cat /etc/psa/.psa.shadow` | |
CREATE USER 'root'@'localhost' IDENTIFIED BY ''; | |
GRANT ALL PRIVILEGES ON * . * TO 'root'@'localhost'; | |
FLUSH PRIVILEGES; | |
exit; | |
Y luego reboot. |
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
You can star on https://m.facebook.com/pages/?category=liked&ref=bookmarks | |
then from console: | |
const unlike_all = ()=> { | |
[].slice.call(document.querySelectorAll('a[role=button]')).filter(x=>x.innerText=='Unlike').map(x=>{x.click(); x.remove()}); | |
[].slice.call(document.querySelectorAll('a[role=button][action=cancel]')).map(x=>x.click()); | |
window.scrollTo(0,document.body.scrollHeight); | |
window.setTimeout(unlike_all, 3 * 1000) | |
}; |
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
iptables -t nat -A OUTPUT -p tcp --dport 25 -j DNAT --to-destination :587 |
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
# VESTA PORTS # | |
#<?php | |
#// Enter your code here, enjoy! | |
#$array = explode(',','21,22,25,53,80,443,110,143,465,783,993,995,3306,8083'); | |
#foreach( $array as $port ){ | |
#echo 'iptables -i eth0 -I FORWARD -d 10.7.0.2 -m comment --comment "Accept to forward ssh traffic" -m tcp -p tcp --dport '.$port.' -j ACCEPT' . PHP_EOL; | |
#echo 'iptables -i eth0 -I FORWARD -m comment --comment "Accept to forward ssh return traffic" -s 10.7.0.2 -m tcp -p tcp --sport '.$port.' -j ACCEPT' . PHP_EOL; | |
#echo 'iptables -i eth0 -t nat -I PREROUTING -m tcp -p tcp --dport '.$port.' -m comment --comment "redirect pkts to virtual machine" -j DNAT --to-destination 10.7.0.2:'.$port.'' . PHP_EOL; |
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
# Remember to setup your ssh-copy-id first | |
# https://www.ssh.com/academy/ssh/copy-id | |
# And then | |
ls --indicator-style=none /home/admin/web/ | xargs -n1 -P4 -I% rsync -avzhP % [email protected]:/root/OLD_CLOUDSTORAGE/ | |
# Just replace your SERVER_IP and setup the destination folder. |
OlderNewer