Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Kirby Rs andkirby

🎯
Focusing
Block or report user

Report or block andkirby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andkirby
andkirby / fetch-all-xsd.sh
Last active Aug 29, 2019
Download all Amazon MWS XSD files recursively.
View fetch-all-xsd.sh
#!/usr/bin/env bash
#############################################################################
# Download Amazon MWS XSD file with all included ones recursively
# It will download XSD files into the same directory of this script
#############################################################################
# USAGE
# $ bash fetch-all-xsd.sh URL_START_XSD_FILE
#
# EXAMPLE
# $ bash fetch-all-xsd.sh https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/amzn-envelope.xsd
@andkirby
andkirby / bash-magento2-autocomplete-install.sh
Last active Nov 6, 2018
Magento 2.x binary file auto-complete installation in Bash CLI.
View bash-magento2-autocomplete-install.sh
#!/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
@andkirby
andkirby / ruby-bash-win.sh
Last active Jan 17, 2019
Fetch Ruby interpreter from GitBash for Windows or Cygwin similar CLI.
View ruby-bash-win.sh
#!/usr/bin/env bash
################################################################################
# This script can install RUBY binaries on Windows in Bash.
#
# Link to this file:
# https://gist.github.com/andkirby/caf9e825e83f38ad98721956d6e0107c/raw/ruby-bash-win.sh
#
# Download latest version by command in GitBash Windows console:
# $ curl -Ls bit.ly/ruby-bash-win | bash
#
View bash-script-template.sh
#!/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 / php-git-bash-win.sh
Last active Nov 9, 2019
Download PHP binaries archive on Windows from GitBash console or similar
View php-git-bash-win.sh
#!/usr/bin/env bash
################################################################################
# This script can install PHP binaries on Windows in Bash.
#
# Link to this file:
# https://gist.github.com/andkirby/67e87e319c376b8676d559edb759e3fe/raw/php-git-bash-win.sh
#
# Download latest version by command in GitBash Windows console:
# $ curl -Ls bit.ly/php-bash-win | bash
#
@andkirby
andkirby / docker-uninstall.sh
Created Jul 24, 2017
Uninstall script for opal-satis containers.
View docker-uninstall.sh
#!/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]}")"
@andkirby
andkirby / .bashrc_git.sh
Last active Jul 17, 2017
Short aliases for GOT
View .bashrc_git.sh
# ---- 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 / .gitconfig
Last active Jun 29, 2017
Sample of global .gitconfig.
View .gitconfig
[user]
name =
email =
[push]
default = current
[core]
excludesfile = ~/.gitignore
editor = vim
autocrlf = input
eol = lf
@andkirby
andkirby / slack.sh
Last active Nov 4, 2019
Shell/Bash script for sending slack messages.
View slack.sh
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user
View find-bin-dir.sh
#!/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
You can’t perform that action at this time.