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 | |
| namespace Valet\Drivers\Custom; | |
| use Valet\Drivers\ValetDriver; | |
| class PrestaShopValetDriver extends ValetDriver | |
| { | |
| public static $ps_exclusions = ['ajax.php', 'dialog.php', 'ajax_products_list.php', 'autoupgrade/', 'filemanager/']; |
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
| # Cache, temp and personal files | |
| /.htaccess | |
| *.log | |
| npm-debug.log.* | |
| .sass-cache/ | |
| /cache/* | |
| download/* | |
| /img/* | |
| /log/* |
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 | |
| namespace App\Providers; | |
| use Illuminate\Support\Collection; | |
| use Illuminate\Pagination\LengthAwarePaginator; | |
| class AppServiceProvider extends ServiceProvider | |
| { | |
| public function boot() |
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 | |
| /** | |
| * This is a proof of concept. In real life you would split up the various parts and allow for different cell value | |
| * types. Also read Leviscowles1986's comment below: | |
| * https://gist.github.com/thehelvetian/2e94d60b796735b167dfb1c7560049ae#gistcomment-1822986 | |
| * | |
| * @param array $ary_values An array containing the cell values | |
| * @return bool Request status | |
| */ | |
| function addRowToSpreadsheet($ary_values = array()) { |
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
| /* | |
| Reads a CSV file in chunks of 10 lines at a time | |
| and returns them in an array of objects for processing. | |
| Assumes the first line of the CSV file has headings | |
| that will be used as the object name for the item you are | |
| processing. i.e. the heading is CurrentURL then refer to | |
| $item->CurrentURL |
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
| def localProperties = new Properties() | |
| def localPropertiesFile = rootProject.file('local.properties') | |
| if (localPropertiesFile.exists()) { | |
| localPropertiesFile.withReader('UTF-8') { reader -> | |
| localProperties.load(reader) | |
| } | |
| } | |
| def flutterRoot = localProperties.getProperty('flutter.sdk') | |
| if (flutterRoot == null) { |
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 | |
| require dirname(__FILE__).'/wp-blog-header.php'; | |
| $wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')"); | |
| $wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'"); | |
| $wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)"); | |
| $wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
| $wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
| $wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')"); |
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
| # robots.txt for Magento 1.9.x / v1.6 2018-08-19 / Peeter Marvet | |
| # (original version from 2015, edited in 2017 to add filter query parameter disallow samples + some wildcards, | |
| # edited in 2018 to add query params blocking to Yandex as named User-agent does not read *) | |
| # based on: | |
| # http://inchoo.net/ecommerce/ultimate-magento-robots-txt-file-examples/ | |
| # http://www.byte.nl/blog/magento-robots-txt/ | |
| # https://astrio.net/blog/optimize-robots-txt-for-magento/ | |
| # | |
| # comment and clone at https://gist.github.com/petskratt/016c9dbf159a81b9d6aa | |
| # Keep in mind that by standard robots.txt should NOT contain empty lines, except between UA blocks! |
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 | |
| /* | |
| * Dependent Plugin Activation/Deactivation | |
| * | |
| * Sources: | |
| * 1. https://pippinsplugins.com/checking-dependent-plugin-active/ | |
| * 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/ | |
| * | |
| */ | |
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
| # Start the old vagrant | |
| $ vagrant init centos-6.3 | |
| $ vagrant up | |
| # You should see a message like: | |
| # [default] The guest additions on this VM do not match the install version of | |
| # VirtualBox! This may cause things such as forwarded ports, shared | |
| # folders, and more to not work properly. If any of those things fail on | |
| # this machine, please update the guest additions and repackage the | |
| # box. |
NewerOlder