Here's a quick command I learned that shows information about the current requests Apache (httpd) is handling:
1
| /usr/sbin/apachectl fullstatus |
This is a simple command I just learned to show the number of running processes for Apache:
ps aux ww | grep httpd | wc -l
I saw many people claiming you can test for the existence of jQuery like this:
1
2
3
4
5
| if (jQuery) {
// jQuery exists, put code here
} else {
// jQuery not loaded, put code here
} |
This is incorrect. It will work fine if jQuery is loaded, but if it's not loaded, javascript will throw an error and the code to execute if jQuery is not loaded will probably not be processed. The modification to fix this is simple:
1
2
3
4
5
| if (window.jQuery) {
// jQuery exists, put code here
} else {
// jQuery not loaded, put code here
} |