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
public const PASSWORD_VALIDATION_REGEX = '/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^A-z\d\n]).{8,}$/'; |
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
#!/usr/bin/env bash | |
| |
OS=`uname -s` | |
| |
if [ $OS != "Darwin" ]; then | |
echo "This script is OSX-only. Please do not run it on any other Unix." | |
exit 1 | |
fi | |
| |
if [[ $EUID -eq 0 ]]; then |
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
select ps_product.reference AS 'sku', ps_product.active AS 'product_online', ps_product.price, ps_product.weight, ps_product.date_add AS 'created_at', | |
CONCAT('/img/p/', | |
IF(CHAR_LENGTH(pi.id_image) >= 5, | |
CONCAT( | |
SUBSTRING(pi.id_image, -5, 1), | |
'/'), | |
''), | |
IF(CHAR_LENGTH(pi.id_image) >= 4, CONCAT(SUBSTRING(pi.id_image, -4, 1), '/'), ''), | |
IF(CHAR_LENGTH(pi.id_image) >= 3, CONCAT(SUBSTRING(pi.id_image, -3, 1), '/'), ''), | |
if(CHAR_LENGTH(pi.id_image) >= 2, CONCAT(SUBSTRING(pi.id_image, -2, 1), '/'), ''), |
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 | |
function calc($nb){ | |
return number_format($nb*1.2,2); | |
} | |
$JSON = []; | |
if (($handle = fopen("owebia.csv", "r")) !== false) { |
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
Mage::getSingleton('adminhtml/session_quote')->getQuote()->getentity_id() |
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
/var/lib/redmine/default/files |
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 | |
ini_set('memory_limit', '2548M'); | |
set_time_limit(0); | |
error_reporting(E_ALL | E_STRICT); | |
define('MAGENTO_ROOT', getcwd()); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
ini_set('display_errors', 1); | |
define('STORE_ID', 3); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); |
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 | |
ini_set('memory_limit', '2048M'); | |
error_reporting(E_ALL | E_STRICT); | |
define('MAGENTO_ROOT', getcwd()); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
Mage::setIsDeveloperMode(true); | |
ini_set('display_erors', 1); | |
Mage::app()->setCurrentStore(3); |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2. in line 1.
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
sku;special_price;special_from_date;special_to_date | |
BALA-0007;14,9;2016-06-22;2016-08-02 |
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 | E_STRICT); | |
define('MAGENTO_ROOT', getcwd()); | |
$mageFilename = MAGENTO_ROOT . '/app/Mage.php'; | |
require_once $mageFilename; | |
ini_set('display_errors', 1); | |
define('STORE_ID', 3); | |
Mage::app()->setCurrentStore(3); |
NewerOlder