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
| DELETE c, t | |
| FROM crm_calls c | |
| LEFT JOIN crm_tickets t on t.call_id=c.id | |
| WHERE c.last_main_ticket_type_id=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
| $clearArr = array_diff($clearArr, array('')); | |
| // 500 000 array_diff => 0.21610689163208 | |
| public static function removeEmpty($var) { | |
| return (!empty($var)); | |
| } | |
| $clearArr = array_filter($clearArr, "removeEmpty"); | |
| // 500 000 removeEmpty => 0.067395925521851 |
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 INET_ATON('94.27.106.191') => 1578855103 | |
| select INET_NTOA(1578855103) => 94.27.106.191 |
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 | |
| $params = $_SERVER['argv']; | |
| if (!$params[1]) | |
| die("Enter user name...\n"); | |
| $link = mysql_connect('IP', 'UserName', 'Pwd'); | |
| if (!$link) { | |
| die('Could not connect: ' . mysql_error()); | |
| } | |
| echo "Connected successfully\n"; |
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 | |
| `sights_lang`.`name`, | |
| `sights_lang`.`address`, | |
| `sights`.`category_id`, | |
| `sights_categories_lang`.`categoryName`, | |
| `sights`.`latitude`, | |
| `sights`.`longitude`, | |
| `sights`.`sights_id` | |
| FROM `partner_hotels`.`sights_lang` | |
| JOIN `partner_hotels`.`sights` |
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 | |
| $dir = opendir ("./mails"); | |
| while ( $file = readdir ($dir)) { | |
| if (( $file != ".") && ($file != "..")) { | |
| system('sendmail -t < ./mails/'.$file); | |
| unlink('./mails/'.$file); | |
| echo "$file\n"; | |
| } | |
| } | |
| closedir ($dir); |
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 auto4.model WHERE `name` like '%\n'; | |
| UPDATE auto3.model m SET name=REPLACE(name, '\n', '') |
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
| yum remove selinux-policy evolution -y; | |
| wget http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/12/Everything/x86_64/os/Packages/mysql-gui-common-5.0r14-1.fc12.x86_64.rpm http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/12/Everything/x86_64/os/Packages/mysql-gui-tools-5.0r14-1.fc12.x86_64.rpm http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/12/Everything/x86_64/os/Packages/mysql-query-browser-5.0r14-1.fc12.x86_64.rpm http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/12/Everything/x86_64/os/Packages/mysql-administrator-5.0r14-1.fc12.x86_64.rpm; | |
| rpm -ihv ./*.rpm | |
| yum install libXv-1.0.5-1.fc13.i686 libXScrnSaver-1.2.0-1.fc12.i686 qt-4.6.3-8.fc13.i686 qt-x11-4.6.3-8.fc13.i686 -y; | |
| yum install skype -y; | |
| yum install cowsay -y; | |
| yum install mc -y; |
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 ./ -type f -exec chmod 644 {} \; | |
| find ./ -type d -exec chmod 755 {} \; |
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
| rm -rf `find . -type d -name .svn` |
OlderNewer