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
for FILE in `ls -1 ../../../bitrix-core/modules/`; do ln -s ../../../bitrix-core/modules/$FILE $FILE; done |
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 ($argc < 3) { | |
throw new Exception('Wrong params count'); | |
} | |
$k = intval($_SERVER['argv'][1]); | |
$n = intval($_SERVER['argv'][2]); | |
if ($n <= 0 || $k <= 0 || $n > $k) { |
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 | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: aobukhov | |
* Date: 1/15/13 | |
* Time: 7:40 PM | |
*/ | |
class CurlRequest implements CurlInterface | |
{ | |
private $curlResource = null; |
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
while true; do echo `date` `top -b -n 1 | grep Mem` >> top.log; sleep 1; done& |
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
# top log oneliner | |
# outputs first 6 lines of top command every second | |
while :; do top -b -n 1 | head -n6; sleep 1; done |
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
DROP PROCEDURE IF EXISTS drop_column_if_exist; | |
DELIMITER ';;' | |
CREATE PROCEDURE drop_column_if_exist(IN schemaName CHAR(255), IN tableName CHAR(255), IN columnName CHAR(255)) BEGIN | |
IF exists( | |
SELECT * | |
FROM information_schema.columns | |
WHERE table_schema = schemaName AND table_name = tableName AND column_name = columnName) | |
THEN | |
SET @query = CONCAT('ALTER TABLE ', tableName, ' DROP COLUMN ', columnName, ';'); |