Skip to content

Instantly share code, notes, and snippets.

View pixelhed's full-sized avatar

Andre Flitsch pixelhed

View GitHub Profile

Keybase proof

I hereby claim:

  • I am pixelhed on github.
  • I am andreflitsch (https://keybase.io/andreflitsch) on keybase.
  • I have a public key ASAnDE9-5rC2hmevp2RPm2q9bSSzBPfVMneoL6a-zpmzGQo

To claim this, I am signing this object:

@pixelhed
pixelhed / docker-machine-rename
Created February 3, 2017 05:43 — forked from alexproca/docker-machine-rename
Rename docker-machine
#!/usr/bin/env bash
#copy this in a folder from path ex: /usr/local/bin
#usage: docker-machine-rename default my-default
OLD_MACHINE_NAME=${1:-default};
NEW_MACHINE_NAME=${2:-my-default-2};
STORE_PATH=`docker-machine inspect $OLD_MACHINE_NAME | grep -m 1 StorePath | cut -d ':' -f 2 | cut -c 3- | rev | cut -c 3- | rev`;
mv "$STORE_PATH/machines/$OLD_MACHINE_NAME" "$STORE_PATH/machines/$NEW_MACHINE_NAME";
cp "$STORE_PATH/machines/$NEW_MACHINE_NAME/config.json" "$STORE_PATH/machines/$NEW_MACHINE_NAME/config.json.bak"
@pixelhed
pixelhed / AcceptanceHelper.php
Created February 1, 2017 06:57 — forked from pastuhov/AcceptanceHelper.php
codeception page load wait helper
<?php
namespace tests\codeception\common\_support;
use Codeception\Exception\ModuleException;
/**
*
*/
class AcceptanceHelper extends \Codeception\Module
@pixelhed
pixelhed / cleanImages.php
Created April 9, 2016 06:17 — forked from peterjaap/cleanImages.php
Script to clean up the images tables in a Magento installation. Removes references to non-existing images, removes duplicate images, sets correct default image and deletes orphaned images from the filesystem.
<?php
/*
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem.
* It also removes images that are exact copies of another image for the same product.
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images).
*
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered.
*
* Place scripts in a folder named 'scripts' (or similar) in the Magento root.