Skip to content

Instantly share code, notes, and snippets.

@andkirby
andkirby / magento.prod.mob.conf
Last active November 2, 2016 13:49
mob nginx config
server {
listen 80;
listen 443 ssl;
ssl_certificate /etc/pki/tls/certs/www.m.com_2015-06-18.crt;
ssl_certificate_key /etc/pki/tls/private/www.m.com_2015-06-18.key;
ssl_session_timeout 7m;
## Specify your SSL options here
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
@andkirby
andkirby / Config.php
Created December 30, 2016 16:13
Mage_Core_Model_Config Magento 1.14.2.2 Fix for Redis.
<?php
/**
* Magento Enterprise Edition
*
* NOTICE OF LICENSE
*
* This source file is subject to the Magento Enterprise Edition End User License Agreement
* that is bundled with this package in the file LICENSE_EE.txt.
* It is also available through the world-wide-web at this URL:
* http://www.magento.com/license/enterprise-edition
@andkirby
andkirby / mageshell-params.sh
Created January 4, 2017 08:52
mageshell-params for Docker.
#!/usr/bin/env bash
DB_HOST="${MYSQL_HOSTNAME}"
DB_NAME="${MYSQL_DATABASE}"
DB_USER="${MYSQL_USER}"
DB_PASSWORD="${MYSQL_PASSWORD}"
PROJECT_DOMAIN_MASK="$(hostname)"
ADMIN_PASSWORD="${ADMIN_PASSWORD}"
ADMIN_EMAIL="${ADMIN_EMAIL}"
MEDIA_DIR_OWNER="${DOCROOT_OWNER_USER}"
PROJECT_DIR_OWNER="${DOCROOT_OWNER_USER}"
#!/usr/bin/env bash
# Find possible writable binary directory
set -o pipefail
set -o errexit
set -o nounset
#set -o xtrace
# Set magic variables for current file & dir
@andkirby
andkirby / .xd_swi
Last active May 26, 2017 10:14
XDebug switcher
#!/usr/bin/env bash
###############################################################################
# !!!!!!!!!! This script is deprecated, but you may continue use it. !!!!!!!! #
# Actually, it doesn't contain a code. It migrated into a repository. #
# Please take a look at https://github.com/rikby/xdebug-switcher #
###############################################################################
#
# Download this gist into file "~/.xd_swi"
# curl -Ls https://goo.gl/IxjlaC | bash
# or
@andkirby
andkirby / .gitconfig
Last active June 29, 2017 12:40
Sample of global .gitconfig.
[user]
name =
email =
[push]
default = current
[core]
excludesfile = ~/.gitignore
editor = vim
autocrlf = input
eol = lf
@andkirby
andkirby / .bashrc_git.sh
Last active July 17, 2017 16:24
Short aliases for GOT
# ---- GIT ----
#alias git="/d/prog/git/bin/git.exe"
# Git status
alias gg="git status -uno"
# Re-add files (refresh cache)
#alias gau='git status -s | cut -c4- | xargs git add'
alias gau="git diff --name-only --cached | xargs -I '{}' realpath --relative-to=. $(git rev-parse --show-toplevel)/'{}'"
# Re-add files (refresh cache) and commit
alias gc="gau && git commit -m"
alias gl='git log -3'
@andkirby
andkirby / docker-uninstall.sh
Created July 24, 2017 13:49
Uninstall script for opal-satis containers.
#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
#set -o xtrace
# Set magic variables for current file & dir
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
__file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
#!/usr/bin/env bash
# Script for testing options
set -o pipefail
set -o errexit
set -o nounset
#set -o xtrace
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@andkirby
andkirby / bash-magento2-autocomplete-install.sh
Last active November 6, 2018 04:55
Magento 2.x binary file auto-complete installation in Bash CLI.
#!/usr/bin/env bash
###################################
# Auto-complete for Magento2 console "bin/magento" file
#
# Download and install:
# $ curl -Ls https://gist.github.com/andkirby/76c5f09d8c6bd55d0fe21a906d72defe/raw/bash-magento2-autocomplete-install.sh | bash
#
# MANUAL INSTALLATION
# "bash-completion" installation:
# $ yum install -y bash-completion