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
#!/usr/bin/env bash | |
echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern | |
echo 0 > /proc/sys/kernel/core_uses_pid | |
ulimit -c unlimited |
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 | |
$filestore = new \Illuminate\Cache\FileStore( | |
new \Illuminate\Filesystem\Filesystem(), | |
'/some/path/to/somewhere/specific/intervention-cache'); | |
$repository = new \Illuminate\Cache\Repository($filestore); | |
$cache = new \Intervention\Image\ImageCache($repository); | |
$watermark = $cache->make($watermarkFile)->get(0, true); |
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
$commonwealthSubscribers = Mage::getModel('customer/customer') | |
->getCollection() | |
->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing') | |
->addAttributeToFilter('billing_country_id', array('in' => 'AU', 'CA', 'GB')) |
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 | |
/** | |
* @param array $data | |
* @return string | |
*/ | |
public function str_putcsv($data) | |
{ | |
$fh = fopen('php://memory', 'rwb'); | |
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
location ^~ /store/app { | |
access_log off; | |
log_not_found off; | |
return 404; | |
} |
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 | |
/* @var $installer Mage_Model_Customer_Entity_Setup */ | |
$installer = $this; | |
/* @var $eavConfig Mage_Eav_Model_Config */ | |
$eavConfig = Mage::getSingleton('eav/config'); | |
$installer->startSetup(); |
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 | |
class ZdbCountExample | |
{ | |
public function doSelect() | |
{ | |
$pageSize = 1000; | |
$numPages = ceil($this->count($this->baseSelect()) / $pageSize); | |
for ($page = 0; $page <= $numPages; $page++) { |
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 | |
$selectionQtys = array_reduce($savedSelections, function($sum, $selectionId) { $sum[$selectionId]++; return $sum; }, array()); |
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 | |
$options = array( | |
'product' => 8234, | |
'bundle_option'=>array( | |
'297'=>1233 | |
), | |
'qty'=>$qty | |
); |
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
<IfModule mod_fastcgi.c> | |
AddHandler php5-fcgi .php | |
Action php5-fcgi /php5-fcgi | |
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi | |
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization | |
</IfModule> |