This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php -r '$config = require "app/etc/config.php"; \ | |
$config = ["modules" => $config["modules"]]; \ | |
echo "<?php\nreturn "; var_export($config); \ | |
echo ";";' \ | |
> app/etc/config.php.cleaned && mv app/etc/config.php.cleaned app/etc/config.php | |
php -r '$config = require "app/etc/env.php"; \ | |
unset($config["system"]); \ | |
echo "<?php\nreturn "; \ | |
var_export($config); \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
# This script can merge all split SSH configuration into `~/.ssh/config` file. | |
# | |
# HOW IT WORKS | |
# It will merge all files by mask config.*.merge, i.e.: | |
# ~/.ssh/config.MY_PROJECT.merge | |
# Initial exists `~/.ssh/config` file will be copied to `~/.ssh/config.orig`. | |
# Use this `config.orig` for further changes. | |
# | |
# Anyway, you may not use this script and just run: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################## | |
# Reset time on login # | |
######################################## | |
# you may try to use system last logged time: `last ${USER} -n1 | head -1 | awk '{print $4" "$5" "$6" "$7}'` | |
time_sync_command='sudo ntpdate -s time.nist.gov' | |
# max time not logged value | |
not_logged_max_time_h=6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################################################################## | |
# Synchronize .ssh files from Windows file system to Ubuntu WSL # | |
################################################################## | |
set -o pipefail | |
set -o errexit | |
set -o nounset | |
#set -o xtrace | |
# Set magic variables for current file & dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
################################################################## | |
# Automatically download Git Bash for Windows portable version # | |
################################################################## | |
# Quick running: | |
# curl -Ls https://gist.githubusercontent.com/andkirby/16e3c7e4be8bac4c6b3bd0ae8f713552/raw/git-downloader | bash | |
################################################################## | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ClipboardTimeout 2000 | |
#SingleInstance force | |
; Working example | |
; You may test in some wysiwyg editor | |
; Win + R — Write clipboard | |
#r:: | |
{ | |
ClipWait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)" |
NewerOlder