wget sys.sonassi.com/mage-dbdump.sh && chmod +x ./mage-dbdump.sh
This file contains 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 | |
error_reporting(E_ALL); | |
function xrange($start, $end, $step = 1) { | |
for ($i = $start; $i < $end; $i += $step) { | |
yield $i; | |
} | |
} |
This file contains 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 | |
error_reporting(E_ALL); | |
/* Data can be send to coroutines using `$coroutine->send($data)`. The sent data will then | |
* be the result of the `yield` expression. Thus it can be received using a code like | |
* `$data = yield;`. | |
*/ | |
/* What we're building in this script is a coroutine-based streaming XML parser. The PHP |
This file contains 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
Major Magento Releases | |
CE 1.0 (Mar 2008) | |
CE 1.1 (Jul 2008) | |
CE 1.2 (Dec 2008) | |
CE 1.3 (Apr 2009) | |
EE 1.6 (Nov 2009) | |
EE 1.7 (Jan 2010) | |
CE 1.4 (Feb 2010) | |
EE 1.8 (Apr 2010) |
This file contains 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
<?xml version="1.0"?> | |
<!-- license --> | |
<config> | |
<global> | |
<!-- global config --> | |
</global> | |
<frontend> | |
<events> | |
<!-- disble logs --> | |
<controller_action_predispatch> |
This file contains 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 | |
declare(strict_types = 1); | |
namespace Training5\VendorRepository\Controller\Test; | |
use Magento\Catalog\Api\Data\ProductInterface; | |
use Magento\Catalog\Api\ProductRepositoryInterface; | |
use Magento\Framework\Api\Filter; | |
use Magento\Framework\Api\FilterBuilder; |
This file contains 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 | |
/** | |
* Return the path of the auth.json file. | |
*/ | |
function findAuthJson() { | |
// Windows sets HOMEDRIVE and HOMEPATH, but cygwin sets HOME. | |
if (!isset($_SERVER["HOME"]) && isset($_SERVER["HOMEDRIVE"])) { |
This file contains 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 | |
/** | |
* @file | |
* Basic demonstration of how to do parallel threads in PHP. | |
*/ | |
// This array of "tasks" could be anything. For demonstration purposes | |
// these are just strings, but they could be a callback, class or | |
// include file (hell, even code-as-a-string to pass to eval()). |
Bash scripting cheatsheet: https://github.com/dylanaraps/pure-bash-bible#loop-over-files-and-directories
OlderNewer