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
| SET FOREIGN_KEY_CHECKS=0; | |
| TRUNCATE table1; | |
| TRUNCATE table2; | |
| SET FOREIGN_KEY_CHECKS=1; |
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 | |
| namespace Application\View\Helper; | |
| use Zend\View\Helper\AbstractHelper; | |
| use Zend\ServiceManager\ServiceLocatorAwareInterface; | |
| class Slug extends AbstractHelper implements ServiceLocatorAwareInterface | |
| { | |
| public function __invoke($str = null, $replace=array(), $delimiter='-') | |
| { |
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
| //setting | |
| $('select option:contains("10")').prop('selected', true); | |
| //unsetting | |
| $('select option:selected').removeAttr("selected") |
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 column FROM table WHERE column NOT IN | |
| (SELECT intended_foreign_key FROM another_table) |
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
| SET FOREIGN_KEY_CHECKS=0; |
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
| nc example.com 587 < /dev/null; echo $? |
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 | |
| function getimg($url, $path, $overwrite = false) { | |
| $imageName= basename($url); | |
| if(file_exists($path.$imageName) && !$overwrite) { | |
| return $path.$imageName; | |
| } | |
| $headers[] = 'Accept: image/gif, image/x-bitmap, image/jpeg, image/pjpeg'; | |
| $headers[] = 'Connection: Keep-Alive'; |
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
| if (typeof console === "undefined") { | |
| var console = { | |
| log: function() {}, | |
| info: function() {} , | |
| warn: function() {}, | |
| error: function() {} | |
| } | |
| } | |
| _debug = { | |
| log : function(message) { |