<head> <script type=”text/javascript”> parent.window.scrollTo(0,0); </script> </head> Or <body onload=”parent.window.scrollTo(0,0); “>
Javascript validate empty form fields
Check for Empty Fields Using JavaScript To make the web browser check that a field is not empty, you will need to add a call to your validation function when the form is submitted. Do this by adding a “onsubmit” attribute to your FORM tag, like the following : <form…
Bulk change author wordpress
1) Login into wordpress admin area. 2) Click Pages section. 3) Select the pages for which you need to edit the author details. [check box] 4) From the top there is drop down for bulk actions -> select edit and apply. 5) Now, you can change author, comment, status, pings,…
How to change the icons size on desktop for Windows 7
Hold the Ctrl Key and move the scroll wheel on the mouse to resize the icons.
Create admin user wordpress
########################################### <?php // ADD NEW ADMIN USER TO WORDPRESS // ———————————- // Put this file in your WordPress root directory and run it from your browser. // Delete it when you’re done. require_once(‘wp-blog-header.php’); require_once(‘wp-includes/registration.php’); // —————————————————- // CONFIG VARIABLES // Make sure that you set these before running the file.…
Chmod directories & files
To change all the directories to 755 (-rwxr-xr-x): find /var/html/htdocs -type d -exec chmod 755 {} \; To change all the files to 644 (-rw-r–r–): find /var/html/htdocs -type f -exec chmod 644 {} \;
Increase max inodes gpfs online
To see max inodes df -i mmchfs /dev/data -F #maxinodes https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014488860
Resolve xmlrpc.php attack
Add the following code to .htaccess file <Files “xmlrpc.php”> Order Allow,Deny deny from all </Files> Firewall IP iptables -A INPUT -s [IP] -j DROP ipfw add 3 deny tcp from [IP] to any
Useful Tcpdump Commands
# HTTP GET tcpdump -s 0 -A ‘tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420’ #HTTP POST tcpdump -s 0 -A ‘tcp dst port 80 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)’
