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
{ | |
"exclude": [ | |
".git/**", | |
"node_modules/**", | |
"bower_components/**" | |
], | |
"always-semicolon": true, | |
"block-indent": " ", | |
"color-case": "lower", | |
"color-shorthand": true, |
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 | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
Mage::app()->getLocale()->emulate(1); | |
// loads the proper email template | |
$emailTemplate = Mage::getModel('core/email_template')->loadDefault('eflips_new_order'); | |
// $emailTemplate = Mage::getModel('core/email_template')->loadDefault('sales_email_order_template'); | |
// $emailTemplate = Mage::getModel('core/email_template')->loadByCode('2 - Pedido Realizado (NOVO)'); |
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 | |
$mediaDir = Mage::getBaseDir('media'); | |
$varDir = Mage::getBaseDir('var'); | |
$backupDir = "$varDir/media_unused"; | |
if (!is_dir($backupDir)) { | |
mkdir($backupDir, 0770, true); | |
} |
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 | |
$customers = []; | |
for ($count = 1; $count < 100000; $count++) { | |
$customers[] = [ | |
'id' => $count, | |
'name' => array_random(['Lorem', 'Ipsum', 'Dolor']), | |
]; | |
} |
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
const submitForm = (form, callback = null) => { | |
// [..] | |
fetch(form.action, [..]) | |
.then(response => { | |
// [..] | |
if (callback) { | |
callback(response) // executa a função personalizada que varia pra cada form, passando a response pra ela | |
} | |
}) |
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
<li class="products-grid-item"> | |
<img class="products-grid-item__image"> | |
<div class="products-grid-item__description">[..]</div> | |
<span class="products-grid-item__price">[..]</span> | |
<button class="button button - buy">[..]</button> | |
</li> |
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
.header { | |
@media #{$mobile} { | |
grid-template-areas: 'logo cart' 'search search' 'links links' 'categories categories'; | |
grid-template-columns: 1fr auto; | |
} | |
} |
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 | |
class CustomersController extends Controller | |
{ | |
public function store(CustomerFormRequest $request) | |
{ | |
$customer = Customer::create($request->input()); | |
return redirect(route('customers.show', $customer->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 | |
use App\Htpp\Controllers\CustomersController; | |
class CustomersControllerTest extends TestCase | |
{ | |
public function testCustomerRegister() | |
{ | |
// Simulando os dados necessários | |
$formData = [ |
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
.products-grid { | |
display: grid; | |
grid-gap: 15px; | |
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); // distribui os itens e já deixa a grade responsiva | |
} |
OlderNewer