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
var isDateSupported = function () { | |
var input = document.createElement('input'); | |
var value = 'a'; | |
input.setAttribute('type', 'date'); | |
input.setAttribute('value', value); | |
return (input.value !== value); | |
}; | |
if (isDateSupported()) { | |
// Browser native date pickers are supported! |
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 bin/magento setup:install --base-url={base_url} \ | |
--db-host=localhost --db-name={db_name} --db-user={db_username} --db-password={db_password} \ | |
--admin-firstname={name} --admin-lastname={lastname} --admin-email={email} \ | |
--admin-user=admin --admin-password={admin_pass} --language=es_ES \ | |
--currency=EUR --timezone=Europe/Madrid --use-rewrites=1 |
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
git add -A && git commit -m "Your Message" |
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
define([ | |
'jquery', | |
'matchMedia', | |
'domReady!' | |
], function ($, mediaCheck) { | |
'use strict'; | |
/*...*/ | |
mediaCheck({ | |
media: '(min-width: 768px)', | |
// Switch to Desktop Version |
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 artisan make:model Todo -mcr | |
php artisan migrate |
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
var data = [ | |
{ | |
name: 'Kyle', | |
occupation: 'Fashion Designer' | |
}, | |
{ | |
name: 'Liza', | |
occupation: 'Web Developer' | |
}, | |
{ |
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
var numbers = [1, 4, 9]; | |
var doubles = numbers.map(function(num) { | |
return num * 2; | |
}); | |
// Logs [2, 8, 18] | |
console.log(doubles); | |
var data = [ | |
{ |
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
<block class="Magento\Cms\Block\Block" name="Promo"> | |
<arguments> | |
<argument name="block_id" xsi:type="string">promo</argument> | |
</arguments> | |
</block> |
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/magento i18n:collect-phrases app/code/Vendor/Module/ -o app/code/Vendor/Module/i18n/en_US_raw.csv |
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
var original = [1, 2, 7, 42, 99, 101]; | |
// Get items bigger than 10 | |
var biggerThanTen = original.filter(function (item) { | |
return item > 10; | |
}); | |
// Get items smaller than 10 | |
var smallerThanTen = original.filter(function (item) { | |
if (item < 10) { |