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
| brew install --cask michaelvillar-timer |
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 start = Date.now(); | |
| function output(variable){console.log(variable);} | |
| setInterval(function() { | |
| var delta = Date.now() - start; // milliseconds elapsed since start | |
| output(Math.floor(delta / 1000)); // in seconds | |
| // alternatively just show wall clock time: | |
| output(new Date().toUTCString()); | |
| }, 1000); // update about every second |
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 { createServer } = require("http"); | |
| const { parse } = require("url"); | |
| const next = require("next"); | |
| const dev = process.env.NODE_ENV !== "production"; | |
| const port = !dev ? process.env.PORT : 3000; | |
| // Create the Express-Next App | |
| const app = next({ dev }); | |
| const handle = app.getRequestHandler(); |
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
| $config['system.logging']['error_level'] = 'verbose'; |
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
| <div id="errors" style=" | |
| background: #c00; | |
| color: #fff; | |
| display: none; | |
| margin: -20px -20px 20px; | |
| padding: 20px; | |
| white-space: pre-wrap; | |
| "></div> | |
| <div id="root"></div> | |
| <script> |
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 hide_shipping_methods( $available_shipping_methods, $package ) { | |
| $shipping_classes = array( 'some-shipping-class-1', 'some-shipping-class-2' ); | |
| $excluded_methods = array( 'free_shipping' ); | |
| $shipping_class_exists = false; | |
| foreach( $package['contents'] as $key => $value ) | |
| if ( in_array( $value['data']->get_shipping_class(), $shipping_classes ) ) { | |
| $shipping_class_exists = true; | |
| break; | |
| } | |
| if ( $shipping_class_exists ) { |
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
| magerun config:store:set dev/js/merge_files 0 | |
| magerun config:store:set dev/js/enable_js_bundling 0 | |
| magerun config:store:set dev/js/minify_files 0 | |
| magerun config:store:set dev/css/merge_css_files 0 | |
| magerun config:store:set dev/css/minify_files 0 |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <title>Webshop under construction</title> | |
| <link href="https://fonts.googleapis.com/css?family=Noto+Sans:400,700" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <style> |
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 module:status | grep Magento_Inventory | grep -v List | grep -v None | grep -v -e '^$' | xargs php bin/magento module:disable | |
| php bin/magento s:upgrade | |
| php bin/magento s:s:deploy -f | |
| php bin/magento c:flush | |
| php bin/magento i: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
| To set your global username/email configuration: | |
| Open the command line. | |
| Set your username: git config --global user.name "Nav Appaiya" | |
| Set your email address: | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Nav Appaiya" | |
| git config user.email "[email protected]" | |
| git config user.name "Nav Appaiya" |