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 | |
$root = realpath('./'); | |
$cartridges = []; | |
$countries = ['bg', 'sl', 'et', 'hu', 'nl', 'sv', 'da', 'de', 'pt', 'fi', 'it', 'ja', 'ro', 'ko', 'lt', 'pl', 'lv', 'lb', 'ca', 'es', 'fr', 'hr', 'ro', 'ru', 'sk', 'el', 'cs', 'zh', 'no', 'tr']; | |
$locales = ['nl_BE', 'de_DE', 'ja_JP', 'en_JP', 'en_DE', 'en_PH', 'en_US', 'en_HU', 'fr_FR', 'fr_IT', 'it_IT', 'zh_CN', 'en_GB']; | |
function findLanguageProperties($start, $cartridges) { | |
global $countries, $locales; |
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
#!/bin/sh | |
### | |
### Modify this variable only. It should point to your app/etc/evn.php file. | |
ENV_FILE="/app/p2f3xbqpgpxow/app/etc/env.php" | |
### | |
### | |
extract_from_env () { | |
dirty=$(grep -m 1 $1 $ENV_FILE) |
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 | |
namespace Vendor\Namespace\Plugin; | |
use Magento\Catalog\Helper\ImageFactory; | |
use Magento\Catalog\Helper\Product\Compare; | |
use Magento\Catalog\Model\ProductRepository; | |
class AddImageToCompareProductsPlugin | |
{ |
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 | |
/** | |
* Get a list of all WooCommerce orders that have negative fees applied. | |
* Installation: Just put it in your root folder (where wp-config.php is). Execute the file /fee-orders.php. | |
* | |
*/ | |
require_once "wp-load.php"; |
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
@margin: 10px; | |
@margin-thin : @margin/2; | |
@margin-thiner : @margin/3; | |
@margin-thinest : @margin/4; | |
@margin-thick : @margin*2; | |
@margin-thicker : @margin*3; | |
@margin-thickest : @margin*4; | |
.helper(@value:@margin); | |
.helper(@name:-thin,@value:@margin-thin); |
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 | |
function request($url, $cache = false) { | |
$prefix = 'cache_response_'; | |
if($cache === true) { | |
$folder = dirname(__FILE__ ) . DIRECTORY_SEPARATOR . 'cache'; | |
$folder = file_exists($folder) && is_writable($folder) ? $folder : '/tmp'; | |
$file = $folder . '/' . $prefix . md5($url); |
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 | |
/* | |
Increase or decrease value in CakePHP with little footprint. | |
Add this to your AppModel. | |
Usage: | |
(in Controller) | |
$this->Model->increase('field_name', 1); |