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 | |
| /** | |
| * Generates a random string based on ASCII coding. | |
| * @author Er Galvão Abbott <[email protected]> | |
| * @see http://www.asciitable.com/ | |
| */ | |
| $result = ''; | |
| $bgn = 33; |
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 | |
| /** | |
| * Random draw, "interactively" reducing the original array so each participant is drawn only once. | |
| * @author Er Galvão Abbott <[email protected]> | |
| */ | |
| $rounds = 3; | |
| $eagerParticipants = array('Ad Rock', 'Mike D', 'MCA', 'Chuck D', 'Flavor Flav', 'Jammaster Jay', 'Terminator X'); | |
| $luckyBastards = array(); |
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 | |
| class Helper_Decrypt extends Zend_Controller_Action_Helper_Abstract | |
| { | |
| private $applicationConfig, $cryptoConfig, $result; | |
| public function direct($cryptedData, $base64Decode = TRUE) | |
| { | |
| $this->applicationConfig = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', APPLICATION_ENV); | |
| $this->cryptoConfig = $this->applicationConfig->my->crypto; |
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
| mysqldump --complete-insert --extended-insert --host=localhost --user=myUser --password=myPass --result-file=dump.sql --routines myDB |
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
| du -Sh .|sort -hr|more |
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
| find /path/to/dir -name '.git*' -exec rm -rf {} \; |
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
| music123 -l -r -z ~/Music/* |
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 MAX(LENGTH(TRIM(column))) FROM entity; |
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 | |
| table_name, | |
| column_name, | |
| data_type, | |
| character_maximum_length, | |
| numeric_precision, | |
| numeric_scale, | |
| column_type, | |
| column_key, | |
| extra, |
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 | |
| * | |
| FROM | |
| information_schema.referential_constraints | |
| WHERE | |
| table_name='<table_name>' | |
| AND constraint_schema='<database_name>'; |
OlderNewer