Skip to content

Instantly share code, notes, and snippets.


Robert robbanl

  • Codepeak AB
  • Sweden
View GitHub Profile
robbanl /
Last active Apr 6, 2018
Quick Docker Exec to bash
# Feel free to create a bash alias to this file or place it in /usr/local/bin
# Usage: dex php to run "bash" in interactive mode on any container that contains php in it's name
CONTAINER="$(docker ps -f name=$1 | sed -n 2p)"
CONTAINER_NAME=`echo $CONTAINER | awk '{ print $NF }'`
# Make sure some argument is set
fbrnc / gist:7645313
Last active Jan 10, 2019
Reset Magento EE changelogs
View gist:7645313
truncate catalog_product_flat_cl;
truncate catalog_category_product_index_cl;
truncate catalog_category_product_cat_cl;
truncate catalog_category_flat_cl;
truncate catalogsearch_fulltext_cl;
truncate cataloginventory_stock_status_cl;
truncate catalog_product_flat_cl;
truncate catalog_product_index_price_cl;
truncate enterprise_url_rewrite_category_cl;
truncate enterprise_url_rewrite_product_cl;
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
dajoho / phpcs
Created Oct 4, 2012
View phpcs
sudo cp /private/etc/php.ini.default /private/etc/php.ini;
sudo php /usr/lib/php/install-pear-nozlib.phar;
pear config-set php_ini /private/etc/php.ini;
pecl config-set php_ini /private/etc/php.ini;
sudo pear upgrade-all;
sudo pear install PHP_CodeSniffer;
nano /private/etc/php.ini;
include_path Zeile einkommentieren & umändern in:
ptz0n / gist:1217080
Created Sep 14, 2011
Validate JSONP Callback
View gist:1217080
* Validate JSONP Callback