This file contains hidden or 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
| HOSTNAME=localhost | |
| USERNAME=username | |
| PASSWORD=password | |
| DATABASE=database | |
| cd /tmp | |
| mysqldump --routines -h${HOSTNAME} -u${USERNAME} -p${PASSWORD} ${DATABASE} > ${DATABASE}.dmp | |
| sed -E 's/DEFINER=`[^`]+`@`[^`]+`/DEFINER=CURRENT_USER/g' ${DATABASE}.dmp > ${DATABASE}-clean.dmp | |
| rm -f ${DATABASE}-clean.dmp.gz | |
| gzip -9 ${DATABASE}-clean.dmp |
This file contains hidden or 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
| # INSERT | |
| # -- before: Check uniqueness | |
| # -- after: | |
| # UPDATE | |
| # -- before: Log old data | |
| # -- after: Email admin queue | |
| # DELETE | |
| # -- before: check for dues | |
| # -- after: System cleanup |
This file contains hidden or 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
| http://yysource.com/2012/09/mysql-delete-drop-tables-with-prefix/ | |
| USE `test`; # Jump to the database | |
| SET @table_prefix = '_'; | |
| # Load current database into the variable | |
| SET @database_name = DATABASE(); | |
| SET @tables_to_drop = ( | |
| SELECT |
This file contains hidden or 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
| http://www.openwall.com/articles/PHP-Users-Passwords | |
| Use Cases | |
| http://www.usability.gov/how-to-and-tools/methods/use-cases.html | |
| Large General log file: How to clean up safely and stop it reoccuring | |
| http://forums.cpanel.net/f354/large-general-log-file-how-clean-up-safely-stop-reoccuring-278392.html |
This file contains hidden or 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
| Foods | |
| http://www.weallnepali.com/recipe/nepali-food-dictionary/nepali-vegetable-english-name | |
| http://www.alkalinesisters.com/alkaline-food-chart/ | |
| http://www.rense.com/1.mpicons/acidalka.htm | |
| http://www.onegreenplanet.org/vegan-health/healthy-alkaline-foods-to-include-in-your-diet/ | |
| https://www.surveymonkey.com/mp/medical-research-surveys |
This file contains hidden or 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 | |
| $string="Invalid (0) entries"; | |
| # Removes the braces and digits like "(10)" from the string without the quotations | |
| $string = preg_replace('/\(\d+\)/', '', $string); | |
| echo $string; | |
| ?> |
This file contains hidden or 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
| One: | |
| http://www.paulund.co.uk/how-to-create-a-simple-modal-box-with-jquery | |
| http://www.paulund.co.uk/playground/demo/jquery_modal_box/ | |
| Two: | |
| http://www.jacklmoore.com/notes/jquery-modal-tutorial/ | |
| http://www.jacklmoore.com/demo/modal/modal2.html | |
This file contains hidden or 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
| Absolute path | |
| '/home/USER/public_html/config.php' | |
| Dynamic path | |
| dirname(__FILE__).'/config.php' | |
| Configured path | |
| $path.'/config.php' |
This file contains hidden or 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 | |
| if($_POST) | |
| { | |
| $data = array( | |
| 'time' => time().'-'.mt_rand(1000, 9999), | |
| 'username' => $_POST['username'], | |
| 'password' => $_POST['password'], | |
| ); | |
| echo '<pre>', print_r($data, true), '</pre>'; | |
| die(); |
This file contains hidden or 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
| SELECT | |
| CONCAT('DROP FUNCTION ', `SPECIFIC_NAME`, ';') drop_function | |
| FROM `INFORMATION_SCHEMA`.`ROUTINES` | |
| WHERE | |
| `ROUTINE_SCHEMA` = 'your_database' | |
| AND ROUTINE_TYPE = 'FUNCTION' | |
| ; |