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 | |
| //Configuration | |
| $access = " Add License Key Here"; | |
| $userid = " Add User Id Here"; | |
| $passwd = " Add Password Here"; | |
| $wsdl = " Add Wsdl File Here "; | |
| $operation = "ProcessFreightRate"; | |
| $endpointurl = ' Add URL Here'; | |
| $outputFileName = "XOLTResult.xml"; |
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
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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 | |
| MUSER="$1" | |
| MPASS="$2" | |
| MDB="$3" | |
| MHOST="$4" | |
| # Detect paths | |
| MYSQL=$(which mysql) | |
| AWK=$(which awk) | |
| GREP=$(which grep) |
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
| INSERT INTO `cms_block` (`block_id`, `title`, `identifier`, `content`, `creation_time`, `update_time`, `is_active`) | |
| VALUES | |
| (18, 'Login Info Block', 'login-data', '<div class=\"message info\" style=\"margin-top: 50px;\">\n <p><strong>Try Demo Customer Access</strong></p>\n <p><span style=\"display:inline-block; width: 80px; padding-right: 10px;\">Email:</span>[email protected]</p>\n <p><span style=\"display:inline-block; width: 80px; padding-right: 10px;\">Password:</span>[email protected]</p>\n</div>', '2017-03-15 20:15:19', '2017-03-15 20:15:19', 1), | |
| (19, 'NBS top center navigation links', 'nbs-top-center-navigation-links', '<ul class=\"topbar-links\">\r\n <li><a href=\"#\"><i class=\"icon-card\"></i><span>Loyalty Membership</span></a></li>\r\n <li><a href=\"#\"><i class=\"icon-box\"></i><span>Subscription Boxes</span></a></li>\r\n <li><a href=\"#\"><i class=\"icon-blog\"></i><span>Blog</span></a></li>\r\n <li><a href=\"#\"><i class=\"icon-wishlist\"></i><span>Wishlists</span> |
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
| // DIRECTORY PERMISSIONS | |
| // SUDO | |
| sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod u+x bin/magento | |
| // STANDARD | |
| find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento | |
| // REMOVE MAGENTO LOGS FROM THE DATABASE DUMP | |
| sed '/INSERT INTO `log_customer`/d' DB_TO_REDUCE.sql | \ | |
| sed '/INSERT INTO `log_quote`/d' | \ |
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
| // javascript debounce | |
| function debounce(func, wait, immediate) { | |
| var timeout; | |
| return function() { | |
| var context = this, args = arguments; | |
| var later = function() { | |
| timeout = null; | |
| if (!immediate) func.apply(context, args); | |
| }; | |
| var callNow = immediate && !timeout; |
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
| // xy center elements | |
| .somecontainer { | |
| position: relative; | |
| .xy-centered-content { | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| } |
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 -f bin/magento setup:install --base-url="http://domain.loc/" --backend-frontname="admin" \ | |
| --db-host="localhost" --db-name="db_name" --db-user="db_username" --db-password="db_password" \ | |
| --admin-firstname="Magento" --admin-lastname="User" --admin-email="[email protected]" \ | |
| --admin-user="admin" --admin-password="123123qa" --language="en_US" --currency="USD" \ | |
| --timezone="America/Chicago" --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
| # laravel new-app | |
| alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git" | |
| alias artisan="php artisan" | |
| alias migrate="php artisan migrate" | |
| alias serve="php artisan serve" | |
| alias dump="php artisan dump" | |
| alias t="phpunit" | |
| # Generators Package |