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
cat /etc/passwd | grep -v nologin |
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
DROP FUNCTION IF EXISTS f_currency; | |
DELIMITER $$ | |
CREATE FUNCTION f_currency() | |
RETURNS FLOAT(8,2) | |
BEGIN | |
RETURN ROUND(RAND()*100, 2); | |
END $$ | |
SELECT f_currency(); |
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
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done | |
Details: | |
http://stackoverflow.com/questions/134906/how-do-i-list-all-cron-jobs-for-all-users | |
http://www.linux-faqs.info/bash/list-all-cron-jobs-for-all-users |
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 | |
/** | |
* Controlled way of handling parameter names. | |
* The script cannot add or read new parameters dynamically. | |
*/ | |
abstract class FixedParameters | |
{ | |
/** | |
* Does not allow the script to modify set of parameters later on. | |
*/ |
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
find . -type f -mtime -2 | grep -v svn |
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
https://kb.leaseweb.com/display/KB/Procedure+to+remove+blacklist | |
http://www.pinpointe.com/blog/how-do-i-know-if-im-on-a-spam-blacklist | |
Procedure to remove blacklist | |
https://kb.leaseweb.com/display/KB/Procedure+to+remove+blacklist |
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
find /home/htdocs -type f -name 'error_log' |
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
HTML View for Gmail | |
https://mail.google.com/mail/?ui=html&zy=h |
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 | |
mkdir -p /home/databases | |
cd /home/databases | |
DATE=`date '+%a'|tr '[:lower:]' '[:upper:]'`; | |
mysqldump --routine -uUSERNAME -pPASSWORD DATABASE1 > ${DATE}-DATABASE1.dmp | |
mysqldump --routine -uUSERNAME -pPASSWORD DATABASE2 > ${DATE}-DATABASE2.dmp |
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 | |
$find = preg_quote('search-term-what-to-find'); | |
$dir='/home/user/public_html'; | |
chdir($dir); | |
$files=array(); | |
$files[] = 'file1.php'; | |
$files[] = 'file2.php'; | |
$files[] = 'path1/file3.php'; |
OlderNewer