Skip to content

Instantly share code, notes, and snippets.

View markvds's full-sized avatar

Mark van der Sanden markvds

View GitHub Profile
@markvds
markvds / README.md
Last active December 1, 2022 10:38
Alternate Merge

Alternate merging for arrays in php

The problem

Given the folowing arrays:

$a1 = [
    'name' => 'First Name',
    'address' => [
        'street' => 'Street 123',
@markvds
markvds / filterable_attributes.php
Created February 25, 2015 09:17
Magento shell script (place it in /shell) to output all filterable attributes. You can then copy/paste it into robots.txt to effectively stop bots from indexing your layered navigation. See also https://www.byte.nl/blog/zoekmachine-bots-en-serverbelasting/
<?php
require_once 'abstract.php';
class Mage_Shell_Filterable_Attributes extends Mage_Shell_Abstract
{
/**
* Run script
*
*/
public function run()
@markvds
markvds / ExcelWriter.php
Created September 3, 2014 13:44
Excel Writer
<?php
/**
* Simple excel generating from PHP5
*
* @package Utilities
* @license http://www.opensource.org/licenses/mit-license.php
* @author Oliver Schwarz <oliver.schwarz@gmail.com>
* @version 1.0
*/