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
// Configuration for your app | |
const path = require('path') | |
const envObj = require('./.env') | |
const env = Object.keys(envObj).reduce((last, current) => { | |
last[current] = JSON.stringify(envObj[current]) | |
return last | |
}, {}) | |
module.exports = function (ctx) { |
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
function flatten(arr, depth = Infinity, result = []) { | |
if(!Array.isArray(arr)) return null | |
for (const value of arr) { | |
if (depth > 0 && Array.isArray(value)) { | |
if (depth > 1) { | |
flatten(value, depth - 1, result) | |
} else { | |
result.push(...value) | |
} | |
} else { |
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
console.log('TEST FROM gist.github.com') |
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
<?xml version="1.0"?> | |
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceBlock name="product.info.review" remove="true" /> | |
<referenceBlock name="reviews.tab" remove="true" /> | |
</body> | |
</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
ompilation from source: /Users/jamesharrington/dev/victory/victory-tailgate/app/design/frontend/victory/vtmain/web/css/collection.less | |
Compilation from source: | |
frontend/victory/vtmain/en_US/css/collection.less | |
variable @border is undefined in file /Users/jamesharrington/dev/victory/victory-tailgate/var/view_preprocessed/css/frontend/victory/vtmain/en_US/css/collection.less in collection.less on line 58, column 25 | |
56| } | |
57| .left-nav-section{ | |
58| border-top: 1px solid @border; | |
59| .show-truncated{ | |
60| background-color: #e8e8e8; |
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
const arr = [1,2,3,4,5,6,7,8] | |
const arrCopy = arr.reduce(function(lastVal, currentVal){ | |
lastVal.push(currentVal) | |
return lastVal // whate ever we return gets used as the next "lastVal" paramater | |
}, [])//this empty array argument gets used as "lastVal" on the loops first iteration | |
arr.push(9)// altering the first array | |
console.log(arr) |
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 | |
rm -rf var/cache/* var/page_cache/* var/generation/* | |
php bin/magento setup:upgrade | |
php bin/magento maintenance:disable | |
. ~/flush-magento.sh |
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
A lot of rm: cant remove bla....... | |
rm: cannot remove ‘var/generation/Symfony/Component/Console/Input/ArrayInputFactory.php’: Read-only file system | |
rm: cannot remove ‘var/generation/Victory/VictoryModule/Controller/Manage/Contact/Interceptor.php’: Read-only file system | |
Cache cleared successfully | |
File system cleanup: | |
/app/var/generation/Composer | |
The file "/app/var/generation/Composer/Console/ApplicationFactory.php" cannot be deleted Warning!unlink(/app/var/generation/Composer/Console/ApplicationFactory.php): Read-only file system | |
/app/var/generation/Magento | |
The file "/app/var/generation/Magento/AdminGws/Model/ResourceModel/CollectionsFactory.php" cannot be deleted Warning!unlink(/app/var/generation/Magento/AdminGws/Model/ResourceModel/CollectionsFactory.php): Read-only file system | |
/app/var/generation/Symfony |
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 | |
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/* | |
php bin/magento setup:upgrade | |
php bin/magento setup:di:compile | |
php bin/magento setup:static-content:deploy --jobs=1 | |
php bin/magento cache:clean | |
php bin/magento cache:flush | |
php bin/magento indexer:reindex |
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/bash | |
echo Install Mac App Store apps first. ( xcode ) | |
read -p "Press any key to continue… " -n1 -s | |
echo '\n' | |
# Check that Homebrew is installed and install if not | |
if test ! $(which brew) | |
then | |
echo " Installing Homebrew" |