Skip to content
Snippets Groups Projects
Commit 4152f03d authored by nimrod's avatar nimrod
Browse files

Merge branch 'master' of cgit.shore.co.il:/srv/git/rcfiles

parents acadbb4b ad7caa33
No related branches found
No related tags found
No related merge requests found
Showing with 1023 additions and 140 deletions
...@@ -15,7 +15,6 @@ callback_whitelist = profile_tasks ...@@ -15,7 +15,6 @@ callback_whitelist = profile_tasks
[ssh_connection] [ssh_connection]
pipelining = True pipelining = True
control_path=/tmp/ssh-%%h
[privilege_escalation] [privilege_escalation]
#become = True #become = True
......
personal_ws-1.1 en 154 personal_ws-1.1 en 158
cfg cfg
runtime runtime
Nginx Nginx
...@@ -15,6 +15,7 @@ crackable ...@@ -15,6 +15,7 @@ crackable
cd cd
Ansible's Ansible's
arn arn
uuencode
SHA SHA
pytest pytest
submodule submodule
...@@ -107,6 +108,7 @@ pdf ...@@ -107,6 +108,7 @@ pdf
ECDSA ECDSA
localhost localhost
linters linters
wget
SimpleHTTPServer SimpleHTTPServer
scrypt scrypt
PyPI PyPI
...@@ -126,6 +128,7 @@ usr ...@@ -126,6 +128,7 @@ usr
PolicyKit PolicyKit
txt txt
Bitbucket Bitbucket
uudecode
entrypoint entrypoint
html html
Jinja Jinja
...@@ -135,6 +138,7 @@ Rackspace ...@@ -135,6 +138,7 @@ Rackspace
AES AES
GPG GPG
PHP PHP
cgit
filenames filenames
sudo sudo
POSIX POSIX
......
! command -v aws_completer >/dev/null || complete -C 'aws_completer' aws
#!/bin/bash
#
# bash completion for docker-compose
#
# This work is based on the completion for the docker command.
#
# This script provides completion of:
# - commands and their options
# - service names
# - filepaths
#
# To enable the completions either:
# - place this file in /etc/bash_completion.d
# or
# - copy this file to e.g. ~/.docker-compose-completion.sh and add the line
# below to your .bashrc after bash completion features are loaded
# . ~/.docker-compose-completion.sh
__docker_compose_previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob
__docker_compose_q() {
docker-compose 2>/dev/null "${top_level_options[@]}" "$@"
}
# Transforms a multiline list of strings into a single line string
# with the words separated by "|".
__docker_compose_to_alternatives() {
local parts=( $1 )
local IFS='|'
echo "${parts[*]}"
}
# Transforms a multiline list of options into an extglob pattern
# suitable for use in case statements.
__docker_compose_to_extglob() {
local extglob=$( __docker_compose_to_alternatives "$1" )
echo "@($extglob)"
}
# Determines whether the option passed as the first argument exist on
# the commandline. The option may be a pattern, e.g. `--force|-f`.
__docker_compose_has_option() {
local pattern="$1"
for (( i=2; i < $cword; ++i)); do
if [[ ${words[$i]} =~ ^($pattern)$ ]] ; then
return 0
fi
done
return 1
}
# Returns `key` if we are currently completing the value of a map option (`key=value`)
# which matches the extglob passed in as an argument.
# This function is needed for key-specific completions.
__docker_compose_map_key_of_current_option() {
local glob="$1"
local key glob_pos
if [ "$cur" = "=" ] ; then # key= case
key="$prev"
glob_pos=$((cword - 2))
elif [[ $cur == *=* ]] ; then # key=value case (OSX)
key=${cur%=*}
glob_pos=$((cword - 1))
elif [ "$prev" = "=" ] ; then
key=${words[$cword - 2]} # key=value case
glob_pos=$((cword - 3))
else
return
fi
[ "${words[$glob_pos]}" = "=" ] && ((glob_pos--)) # --option=key=value syntax
[[ ${words[$glob_pos]} == @($glob) ]] && echo "$key"
}
# suppress trailing whitespace
__docker_compose_nospace() {
# compopt is not available in ancient bash versions
type compopt &>/dev/null && compopt -o nospace
}
# Outputs a list of all defined services, regardless of their running state.
# Arguments for `docker-compose ps` may be passed in order to filter the service list,
# e.g. `status=running`.
__docker_compose_services() {
__docker_compose_q ps --services "$@"
}
# Applies completion of services based on the current value of `$cur`.
# Arguments for `docker-compose ps` may be passed in order to filter the service list,
# see `__docker_compose_services`.
__docker_compose_complete_services() {
COMPREPLY=( $(compgen -W "$(__docker_compose_services "$@")" -- "$cur") )
}
# The services for which at least one running container exists
__docker_compose_complete_running_services() {
local names=$(__docker_compose_services --filter status=running)
COMPREPLY=( $(compgen -W "$names" -- "$cur") )
}
_docker_compose_build() {
case "$prev" in
--build-arg)
COMPREPLY=( $( compgen -e -- "$cur" ) )
__docker_compose_nospace
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--build-arg --compress --force-rm --help --memory --no-cache --pull" -- "$cur" ) )
;;
*)
__docker_compose_complete_services --filter source=build
;;
esac
}
_docker_compose_bundle() {
case "$prev" in
--output|-o)
_filedir
return
;;
esac
COMPREPLY=( $( compgen -W "--push-images --help --output -o" -- "$cur" ) )
}
_docker_compose_config() {
COMPREPLY=( $( compgen -W "--help --quiet -q --resolve-image-digests --services --volumes" -- "$cur" ) )
}
_docker_compose_create() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--build --force-recreate --help --no-build --no-recreate" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_docker_compose() {
case "$prev" in
--tlscacert|--tlscert|--tlskey)
_filedir
return
;;
--file|-f)
_filedir "y?(a)ml"
return
;;
--log-level)
COMPREPLY=( $( compgen -W "debug info warning error critical" -- "$cur" ) )
return
;;
--project-directory)
_filedir -d
return
;;
$(__docker_compose_to_extglob "$daemon_options_with_args") )
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "$daemon_boolean_options $daemon_options_with_args $top_level_options_with_args --help -h --no-ansi --verbose --version -v" -- "$cur" ) )
;;
*)
COMPREPLY=( $( compgen -W "${commands[*]}" -- "$cur" ) )
;;
esac
}
_docker_compose_down() {
case "$prev" in
--rmi)
COMPREPLY=( $( compgen -W "all local" -- "$cur" ) )
return
;;
--timeout|-t)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --rmi --timeout -t --volumes -v --remove-orphans" -- "$cur" ) )
;;
esac
}
_docker_compose_events() {
case "$prev" in
--json)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --json" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_exec() {
case "$prev" in
--index|--user|-u|--workdir|-w)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "-d --detach --help --index --privileged -T --user -u --workdir -w" -- "$cur" ) )
;;
*)
__docker_compose_complete_running_services
;;
esac
}
_docker_compose_help() {
COMPREPLY=( $( compgen -W "${commands[*]}" -- "$cur" ) )
}
_docker_compose_images() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --quiet -q" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_kill() {
case "$prev" in
-s)
COMPREPLY=( $( compgen -W "SIGHUP SIGINT SIGKILL SIGUSR1 SIGUSR2" -- "$(echo $cur | tr '[:lower:]' '[:upper:]')" ) )
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help -s" -- "$cur" ) )
;;
*)
__docker_compose_complete_running_services
;;
esac
}
_docker_compose_logs() {
case "$prev" in
--tail)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--follow -f --help --no-color --tail --timestamps -t" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_pause() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
__docker_compose_complete_running_services
;;
esac
}
_docker_compose_port() {
case "$prev" in
--protocol)
COMPREPLY=( $( compgen -W "tcp udp" -- "$cur" ) )
return;
;;
--index)
return;
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --index --protocol" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_ps() {
local key=$(__docker_compose_map_key_of_current_option '--filter')
case "$key" in
source)
COMPREPLY=( $( compgen -W "build image" -- "${cur##*=}" ) )
return
;;
status)
COMPREPLY=( $( compgen -W "paused restarting running stopped" -- "${cur##*=}" ) )
return
;;
esac
case "$prev" in
--filter)
COMPREPLY=( $( compgen -W "source status" -S "=" -- "$cur" ) )
__docker_compose_nospace
return;
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --quiet -q --services --filter" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_pull() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --ignore-pull-failures --include-deps --no-parallel --quiet -q" -- "$cur" ) )
;;
*)
__docker_compose_complete_services --filter source=image
;;
esac
}
_docker_compose_push() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --ignore-push-failures" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_restart() {
case "$prev" in
--timeout|-t)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --timeout -t" -- "$cur" ) )
;;
*)
__docker_compose_complete_running_services
;;
esac
}
_docker_compose_rm() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--force -f --help --stop -s -v" -- "$cur" ) )
;;
*)
if __docker_compose_has_option "--stop|-s" ; then
__docker_compose_complete_services
else
__docker_compose_complete_services --filter status=stopped
fi
;;
esac
}
_docker_compose_run() {
case "$prev" in
-e)
COMPREPLY=( $( compgen -e -- "$cur" ) )
__docker_compose_nospace
return
;;
--entrypoint|--label|-l|--name|--user|-u|--volume|-v|--workdir|-w)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--detach -d --entrypoint -e --help --label -l --name --no-deps --publish -p --rm --service-ports -T --use-aliases --user -u --volume -v --workdir -w" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_scale() {
case "$prev" in
=)
COMPREPLY=("$cur")
return
;;
--timeout|-t)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --timeout -t" -- "$cur" ) )
;;
*)
COMPREPLY=( $(compgen -S "=" -W "$(__docker_compose_services)" -- "$cur") )
__docker_compose_nospace
;;
esac
}
_docker_compose_start() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
__docker_compose_complete_services --filter status=stopped
;;
esac
}
_docker_compose_stop() {
case "$prev" in
--timeout|-t)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help --timeout -t" -- "$cur" ) )
;;
*)
__docker_compose_complete_running_services
;;
esac
}
_docker_compose_top() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
__docker_compose_complete_running_services
;;
esac
}
_docker_compose_unpause() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
;;
*)
__docker_compose_complete_services --filter status=paused
;;
esac
}
_docker_compose_up() {
case "$prev" in
=)
COMPREPLY=("$cur")
return
;;
--exit-code-from)
__docker_compose_complete_services
return
;;
--scale)
COMPREPLY=( $(compgen -S "=" -W "$(__docker_compose_services)" -- "$cur") )
__docker_compose_nospace
return
;;
--timeout|-t)
return
;;
esac
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--abort-on-container-exit --always-recreate-deps --build -d --detach --exit-code-from --force-recreate --help --no-build --no-color --no-deps --no-recreate --no-start --renew-anon-volumes -V --remove-orphans --scale --timeout -t" -- "$cur" ) )
;;
*)
__docker_compose_complete_services
;;
esac
}
_docker_compose_version() {
case "$cur" in
-*)
COMPREPLY=( $( compgen -W "--short" -- "$cur" ) )
;;
esac
}
_docker_compose() {
local previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob
local commands=(
build
bundle
config
create
down
events
exec
help
images
kill
logs
pause
port
ps
pull
push
restart
rm
run
scale
start
stop
top
unpause
up
version
)
# Options for the docker daemon that have to be passed to secondary calls to
# docker-compose executed by this script.
local daemon_boolean_options="
--skip-hostname-check
--tls
--tlsverify
"
local daemon_options_with_args="
--file -f
--host -H
--project-directory
--project-name -p
--tlscacert
--tlscert
--tlskey
"
# These options are require special treatment when searching the command.
local top_level_options_with_args="
--log-level
"
COMPREPLY=()
local cur prev words cword
_get_comp_words_by_ref -n : cur prev words cword
# search subcommand and invoke its handler.
# special treatment of some top-level options
local command='docker_compose'
local top_level_options=()
local counter=1
while [ $counter -lt $cword ]; do
case "${words[$counter]}" in
$(__docker_compose_to_extglob "$daemon_boolean_options") )
local opt=${words[counter]}
top_level_options+=($opt)
;;
$(__docker_compose_to_extglob "$daemon_options_with_args") )
local opt=${words[counter]}
local arg=${words[++counter]}
top_level_options+=($opt $arg)
;;
$(__docker_compose_to_extglob "$top_level_options_with_args") )
(( counter++ ))
;;
-*)
;;
*)
command="${words[$counter]}"
break
;;
esac
(( counter++ ))
done
local completions_func=_docker_compose_${command//-/_}
declare -F $completions_func >/dev/null && $completions_func
eval "$previous_extglob_setting"
return 0
}
eval "$__docker_compose_previous_extglob_setting"
unset __docker_compose_previous_extglob_setting
complete -F _docker_compose docker-compose docker-compose.exe
...@@ -62,7 +62,7 @@ _docker_machine_value_of_option() { ...@@ -62,7 +62,7 @@ _docker_machine_value_of_option() {
} }
# Returns `key` if we are currently completing the value of a map option # Returns `key` if we are currently completing the value of a map option
# (`key=value`) which matches the extglob passed in as an argument. # (`key=value`) which matches the glob passed in as an argument.
# This function is needed for key-specific argument completions. # This function is needed for key-specific argument completions.
_docker_machine_map_key_of_current_option() { _docker_machine_map_key_of_current_option() {
local glob="$1" local glob="$1"
...@@ -83,9 +83,43 @@ _docker_machine_map_key_of_current_option() { ...@@ -83,9 +83,43 @@ _docker_machine_map_key_of_current_option() {
[ "${words[$glob_pos]}" = "=" ] && ((glob_pos--)) # --option=key=value syntax [ "${words[$glob_pos]}" = "=" ] && ((glob_pos--)) # --option=key=value syntax
[[ ${words[$glob_pos]} == @($glob) ]] && echo "$key" [[ ${words[$glob_pos]} == $glob ]] && echo "$key"
} }
# Finds the position of the first word that is neither option nor an option's argument.
# If there are options that require arguments, you need to pass a glob describing
# those options, e.g. "--option1|-o|--option2".
# Use this function to restrict completions to exact positions after the options.
_docker_machine_pos_first_nonflag() {
local argument_flags=$1
local counter=$((${subcommand_pos:-${command_pos}} + 1))
while [ "$counter" -le "$cword" ]; do
if [ -n "$argument_flags" ] && eval "case '${words[$counter]}' in $argument_flags) true ;; *) false ;; esac"; then
(( counter++ ))
# eat "=" in case of --option=arg syntax
[ "${words[$counter]}" = "=" ] && (( counter++ ))
else
case "${words[$counter]}" in
-*)
;;
*)
break
;;
esac
fi
# Bash splits words at "=", retaining "=" as a word, examples:
# "--debug=false" => 3 words, "--log-opt syslog-facility=daemon" => 4 words
while [ "${words[$counter + 1]}" = "=" ] ; do
counter=$(( counter + 2))
done
(( counter++ ))
done
echo $counter
}
# --- completion functions --------------------------------------------------- # --- completion functions ---------------------------------------------------
_docker_machine_active() { _docker_machine_active() {
...@@ -208,6 +242,21 @@ _docker_machine_ls() { ...@@ -208,6 +242,21 @@ _docker_machine_ls() {
fi fi
} }
_docker_machine_mount() {
if [[ "${cur}" == -* ]]; then
COMPREPLY=($(compgen -W "--help --unmount -u" -- "${cur}"))
else
local pos=$(_docker_machine_pos_first_nonflag)
if [ "$cword" -eq "$pos" ]; then
# We can't complete remote filesystems. All we can do here is to complete the machine.
COMPREPLY=($(compgen -W "$(_docker_machine_machines --filter state=Running)" -S: -- "${cur}"))
_docker_machine_nospace
elif [ "$cword" -eq "$((pos + 1))" ]; then
_filedir -d
fi
fi
}
_docker_machine_provision() { _docker_machine_provision() {
if [[ "${cur}" == -* ]]; then if [[ "${cur}" == -* ]]; then
COMPREPLY=($(compgen -W "--help" -- "${cur}")) COMPREPLY=($(compgen -W "--help" -- "${cur}"))
...@@ -218,7 +267,7 @@ _docker_machine_provision() { ...@@ -218,7 +267,7 @@ _docker_machine_provision() {
_docker_machine_regenerate_certs() { _docker_machine_regenerate_certs() {
if [[ "${cur}" == -* ]]; then if [[ "${cur}" == -* ]]; then
COMPREPLY=($(compgen -W "--force -f --help" -- "${cur}")) COMPREPLY=($(compgen -W "--client-certs --force -f --help" -- "${cur}"))
else else
COMPREPLY=($(compgen -W "$(_docker_machine_machines --filter state=Running)" -- "${cur}")) COMPREPLY=($(compgen -W "$(_docker_machine_machines --filter state=Running)" -- "${cur}"))
fi fi
...@@ -250,7 +299,7 @@ _docker_machine_ssh() { ...@@ -250,7 +299,7 @@ _docker_machine_ssh() {
_docker_machine_scp() { _docker_machine_scp() {
if [[ "${cur}" == -* ]]; then if [[ "${cur}" == -* ]]; then
COMPREPLY=($(compgen -W "--delta -d --help --recursive -r" -- "${cur}")) COMPREPLY=($(compgen -W "--delta -d --help --quiet -q --recursive -r" -- "${cur}"))
else else
_filedir _filedir
# It would be really nice to ssh to the machine and ls to complete # It would be really nice to ssh to the machine and ls to complete
...@@ -329,7 +378,7 @@ _docker_machine_docker_machine() { ...@@ -329,7 +378,7 @@ _docker_machine_docker_machine() {
_docker_machine() { _docker_machine() {
COMPREPLY=() COMPREPLY=()
local commands=(active config create env inspect ip kill ls provision regenerate-certs restart rm ssh scp start status stop upgrade url version help) local commands=(active config create env inspect ip kill ls mount provision regenerate-certs restart rm ssh scp start status stop upgrade url version help)
local flags=(--debug --native-ssh --github-api-token --bugsnag-api-token --help --version) local flags=(--debug --native-ssh --github-api-token --bugsnag-api-token --help --version)
local wants_dir=(--storage-path) local wants_dir=(--storage-path)
...@@ -343,7 +392,7 @@ _docker_machine() { ...@@ -343,7 +392,7 @@ _docker_machine() {
local cur prev words cword local cur prev words cword
_get_comp_words_by_ref -n : cur prev words cword _get_comp_words_by_ref -n : cur prev words cword
local i local i
local command=docker-machine local command=docker-machine command_pos=0
for (( i=1; i < ${cword}; ++i)); do for (( i=1; i < ${cword}; ++i)); do
local word=${words[i]} local word=${words[i]}
...@@ -352,6 +401,7 @@ _docker_machine() { ...@@ -352,6 +401,7 @@ _docker_machine() {
(( ++i )) (( ++i ))
elif [[ " ${commands[*]} " =~ " ${word} " ]]; then elif [[ " ${commands[*]} " =~ " ${word} " ]]; then
command=${word} command=${word}
command_pos=$i
fi fi
done done
......
../.travis/travis.sh
\ No newline at end of file
# shellcheck disable=SC2148,SC1091 # shellcheck disable=SC2148
# If not running interactively, don't do anything # If not running interactively, don't do anything
[ -z "$PS1" ] && return [ -z "$PS1" ] && return
export LANG=en_US.UTF8 export LANG=en_US.UTF8
export HISTFILE="$HOME/.history"
export HISTCONTROL=ignoreboth:erasedups export HISTCONTROL=ignoreboth:erasedups
export HISTSIZE=100000 export HISTSIZE=100000
export HISTFILESIZE=100000 export HISTFILESIZE=100000
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
if [ -n "${BASH:-}" ]
then
shopt -s histappend
shopt -s checkwinsize
shopt -s cmdhist
[ -f /etc/bash_completion ] && . /etc/bash_completion
# shellcheck disable=SC2086,SC1090
[ -d "$HOME/.bash_completion.d" ] && . $HOME/.bash_completion.d/*
# shellcheck disable=SC1090
# added by travis gem
[ -f "$HOME/.travis/travis.sh" ] && . "$HOME/.travis/travis.sh"
# shellcheck disable=SC2015
which aws_completer >/dev/null && complete -C 'aws_completer' aws ||
true
fi
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
fi
# shellcheck disable=SC2142
[ -f /usr/local/bin/virtualenvwrapper.sh ] && . /usr/local/bin/virtualenvwrapper.sh
export REPREPRO_BASE_DIR="$HOME/Documents/Shore/debian-repository" export REPREPRO_BASE_DIR="$HOME/Documents/Shore/debian-repository"
export EDITOR=vim export EDITOR=vim
export GOPATH="$HOME/Documents/Golang" export GOPATH="$HOME/Documents/Golang"
...@@ -53,25 +16,41 @@ export PATH="$HOME/Documents/Shore/ssl-ca:$PATH" ...@@ -53,25 +16,41 @@ export PATH="$HOME/Documents/Shore/ssl-ca:$PATH"
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.cabal/bin:$PATH" export PATH="$HOME/.cabal/bin:$PATH"
export PATH="$HOME/Documents/bin:$PATH" export PATH="$HOME/Documents/bin:$PATH"
export PYTHONSTARTUP=~/.pythonstartup export PYTHONSTARTUP=~/.config/pythonrc/pythonrc.py
export AWS_DEFAULT_PROFILE='shore' export AWS_DEFAULT_PROFILE='shore'
export ANSIBLE_VERBOSITY=2 export ANSIBLE_VERBOSITY=2
export ANSIBLE_COMMAND_WARNINGS=True export ANSIBLE_COMMAND_WARNINGS=True
export ANSIBLE_DEPRECATION_WARNINGS=True export ANSIBLE_DEPRECATION_WARNINGS=True
export ANSIBLE_RETRY_FILES_SAVE_PATH=/tmp/ export ANSIBLE_RETRY_FILES_SAVE_PATH=/tmp/
export ANSIBLE_SSH_PIPELINING=True export ANSIBLE_SSH_PIPELINING=True
export ANSIBLE_SSH_CONTROL_PATH_DIR='/tmp/ssh-%%h'
export ANSIBLE_GATHERING=smart export ANSIBLE_GATHERING=smart
export ANSIBLE_CACHE_PLUGIN=jsonfile export ANSIBLE_CACHE_PLUGIN=jsonfile
export ANSIBLE_CACHE_PLUGIN_CONNECTION="$HOME/.ansible/facts" export ANSIBLE_CACHE_PLUGIN_CONNECTION="$HOME/.ansible/facts"
export ANSIBLE_CALLBACK_WHITELIST=profile_tasks export ANSIBLE_CALLBACK_WHITELIST=profile_tasks
export LYNX_SAVE_SPACE="$HOME/Downloads" export LYNX_SAVE_SPACE="$HOME/Downloads"
export LYNX_TEMP_SPACE="$HOME/.cache/lynx" export LYNX_TEMP_SPACE="$HOME/.cache/lynx"
export VAGRANT_DEFAULT_PROVIDER="virtualbox"
# Blinking
export LESS_TERMCAP_mb=$'\E[01;31m'
# Double bright
export LESS_TERMCAP_md=$'\E[01;35m'
export LESS_TERMCAP_me=$'\E[0m'
# Standout
export LESS_TERMCAP_so=$'\E[01;33m'
export LESS_TERMCAP_se=$'\E[0m'
# Underline
export LESS_TERMCAP_us=$'\E[01;32m'
export LESS_TERMCAP_ue=$'\E[0m'
export PS0="\$(__prerun)"
# shellcheck disable=SC1117
export PS1="\[\$(__prompt)\]\u@\h:\w\$ "
export CDPATH="$HOME/Documents:$HOME/Documents/Shore"
alias ll='ls -lha' alias ll='ls -lha'
alias la='ls -A' alias la='ls -A'
alias l='ls -CF' alias l='ls -CF'
alias gcc='gcc --std=c99 -Wall -Wextra -Werror -pedantic' alias gcc='gcc --std=c99 -Wall -Wextra -Werror -pedantic'
alias dpkglog="grep -v 'status\|trigproc\|configure' /var/log/dpkg.log" alias dpkglog="grep -v 'status\\|trigproc\\|configure' /var/log/dpkg.log"
alias deborphan='deborphan -a --no-show-section --ignore-suggests' alias deborphan='deborphan -a --no-show-section --ignore-suggests'
alias aptitude='aptitude --display-format %p --quiet' alias aptitude='aptitude --display-format %p --quiet'
alias obsolete='aptitude search ?obsolete' alias obsolete='aptitude search ?obsolete'
...@@ -80,39 +59,119 @@ alias missing-recommends="aptitude search '~RBrecommends:~i'" ...@@ -80,39 +59,119 @@ alias missing-recommends="aptitude search '~RBrecommends:~i'"
alias deinstalled="dpkg --get-selections | awk '\$2==\"deinstall\" {print \$1}'" alias deinstalled="dpkg --get-selections | awk '\$2==\"deinstall\" {print \$1}'"
alias ansible-local='ansible localhost -c local -i localhost,' alias ansible-local='ansible localhost -c local -i localhost,'
alias ansible-local-playbook='ansible-playbook -i localhost, -c local' alias ansible-local-playbook='ansible-playbook -i localhost, -c local'
alias concat="perl -pe 's/\n/\\\n/g'" alias concat="perl -pe 's/\\n/\\\\n/g'"
alias deconcat="perl -pe 's/\\\n/\n/g'" alias deconcat="perl -pe 's/\\\\n/\\n/g'"
alias ggo='sudo GOPATH=/usr/share/go go' alias ecr-login='eval $(aws ecr get-login --no-include-email)'
alias ecr-login='eval $(aws ecr get-login)'
alias hostlocal='docker run --rm --privileged --net=host gliderlabs/hostlocal' alias hostlocal='docker run --rm --privileged --net=host gliderlabs/hostlocal'
alias apt-daily="sudo /bin/sh -c 'apt-get update && apt-get dist-upgrade --download-only --yes && apt-get autoclean'" alias cadvisor='docker run --rm --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw --volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --volume=/dev/disk/:/dev/disk:ro --publish=8080:8080 --detach=true --name=cadvisor google/cadvisor:latest'
alias docker-build='docker build -t "$(basename $PWD)" ./' alias __apt-daily="sudo /bin/sh -c 'apt-get update && apt-get dist-upgrade --download-only --yes && apt-get autoclean'"
alias apt-daily="monitor __apt-daily"
alias __flatpak-daily='sudo flatpak update --assumeyes'
alias flatpak-daily="monitor __flatpak-daily"
alias cdtemp='cd $(mktemp -d)' alias cdtemp='cd $(mktemp -d)'
alias 0-day-cleanup='ssh xbmc.shore.co.il "sudo -u debian-transmission find /srv/library/Comics -name *.part -path *0-Day\ Week\ of* -delete"' alias 0-day-cleanup='ssh xbmc.shore.co.il "sudo -u debian-transmission find /srv/library/Comics -name *.part -path *0-Day\ Week\ of* -delete"'
alias httpbin='tox -c $HOME/.tox.ini.httpbin --' alias httpbin='gunicorn httpbin:app'
alias update-requirements='find -name "*requirements*.txt" -exec pur --requirement {} \;' alias update-requirements='find -name "*requirements*.txt" -exec pur --requirement {} \;'
alias restart-kodi='ssh xbmc.shore.co.il "sudo systemctl kill --kill-who all xorg.service"' alias restart-kodi='ssh xbmc.shore.co.il "sudo systemctl kill --kill-who=all --signal=9 xorg.service"'
alias sync-podcasts='(cd && unison podcasts)' alias __sync-podcasts='(cd && unison podcasts)'
alias sync-podcasts='monitor __sync-podcasts'
alias sync-comics='monitor __sync_comics'
# shellcheck disable=SC2142 # shellcheck disable=SC2142
alias tolower='awk "{print tolower(\$0)}"' alias tolower='awk "{print tolower(\$0)}"'
# shellcheck disable=SC2142 # shellcheck disable=SC2142
alias toupper='awk "{print toupper(\$0)}"' alias toupper='awk "{print toupper(\$0)}"'
alias wifi-portal='curl --silent --fail --write-out "%{redirect_url}" --output /dev/null http://detectportal.firefox.com/success.txt' alias wifi-portal='curl --silent --fail --write-out "%{redirect_url}" --output /dev/null http://detectportal.firefox.com/success.txt'
alias urlencode='perl -MURI::Escape -ne "chomp;print uri_escape(\$_), \"\n\""'
alias urldecode='perl -MURI::Escape -ne "chomp;print uri_unescape(\$_), \"\n\""'
alias transmission-remote='ssh -fNo ExitOnForwardFailure=yes xbmc.shore.co.il && transmission-remote' alias transmission-remote='ssh -fNo ExitOnForwardFailure=yes xbmc.shore.co.il && transmission-remote'
alias kpcli='kpcli --kdb ~/Documents/Database.kdbx' alias kpcli='kpcli --kdb ~/Documents/Database.kdbx'
alias gen-mac="hexdump -n5 -e '\"02\" 5/1 \":%02X\" \"\\n\"' /dev/urandom" alias gen-mac="hexdump -n5 -e '\"02\" 5/1 \":%02X\" \"\\n\"' /dev/urandom"
alias clean-swp="find \$HOME/ -name '*.swp' -delete"
alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking no\""
alias todo="vim \$HOME/Documents/TODO.yml"
alias sudo="sudo "
alias git="git "
alias xargs="xargs "
alias presentation='docker dev adarnimrod/presentation'
alias prune_prerun='find "$HOME" -maxdepth 1 -name ".prerun\.[0-9]*" | grep -v "$(pgrep -u "$(id -u)" "$(basename "$SHELL" )" )" | xargs -r rm'
alias netdata='docker run --detach --name netdata --cap-add SYS_PTRACE --volume /proc:/host/proc:ro --volume /sys:/host/sys:ro --volume /var/run/docker.sock:/var/run/docker.sock --publish 19999:19999 firehol/netdata:alpine'
alias newman='docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/etc/newman" -t postman/newman_alpine33'
alias http-server='python3 -m http.server 8080'
alias dd='monitor sudo dd status=progress'
alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete'
alias black='black --line-length 79'
alias torrent_off='ssh xbmc.shore.co.il sudo systemctl stop transmission-{rss,daemon}.service'
alias torrent_on='ssh xbmc.shore.co.il sudo systemctl start transmission-{daemon,rss}.service'
alias bell="printf '\\a'"
command -v notify-send > /dev/null || alias notify-send='bell'
alias __gcloud='docker run --rm -it -v "$HOME/.config/gcloud:/tmp/.config/gcloud" -e "HOME=/tmp" -u "$(id -u):$(id -g)" google/cloud-sdk:alpine'
alias gcloud='__gcloud gcloud'
alias gsutil='__gcloud gsutil'
monitor () {
if eval "$@"
then
notify-send "$(basename "${1#__}") has finished."
else
notify-send --urgency=critical "$(basename "${1#__}") has failed."
fi
}
jt () {
if command -v pygmentize > /dev/null
then
python3 -m json.tool "$@" | pygmentize -l javascript
else
python3 -m json.tool "$@"
fi
}
bold () {
printf '\e[1m' || true
echo "$@"
printf '\e[0m' || true
}
red () {
printf '\e[1;91m' || true
echo "$@"
printf '\e[0m' || true
}
green () {
printf '\e[1;92m' || true
echo "$@"
printf '\e[0m' || true
}
yellow () {
printf '\e[1;93m' || true
echo "$@"
printf '\e[0m' || true
}
blue () {
printf '\e[1;94m' || true
echo "$@"
printf '\e[0m' || true
}
magenta () {
printf '\e[1;95m' || true
echo "$@"
printf '\e[0m' || true
}
cyan () {
printf '\e[1;96m' || true
echo "$@"
printf '\e[0m' || true
}
deduce_aws_region () { deduce_aws_region () {
AWS_DEFAULT_REGION="$(python << EOF AWS_DEFAULT_REGION="$(python3 << EOF
from __future__ import print_function
try:
from urllib import urlopen
except ImportError:
from urllib.request import urlopen from urllib.request import urlopen
import json import json
print(json.load(urlopen('http://169.254.169.254/latest/dynamic/instance-identity/document'))['region']) response = urlopen('http://169.254.169.254/latest/dynamic/instance-identity/document')
print(json.loads(response.read().decode('utf-8'))['region'])
EOF EOF
)" )"
export AWS_DEFAULT_REGION export AWS_DEFAULT_REGION
...@@ -128,39 +187,114 @@ gen_csr () { ...@@ -128,39 +187,114 @@ gen_csr () {
openssl req -new -newkey rsa:4096 -nodes -out "$1.csr" -keyout "$1.key" openssl req -new -newkey rsa:4096 -nodes -out "$1.csr" -keyout "$1.key"
} }
docker_dev () { __sync_comics () {
local root repo uid local this_month last_month format
root="$(git rev-parse --show-toplevel)" format='+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*'
repo="$(basename "$root")" this_month="$( date "$format" )"
uid="$(id -u)" last_month="$( date --date '1 month ago' "$format" )"
docker build -t "$repo:dev" "$root" rsync --prune-empty-dirs --ignore-missing-args --recursive --compress --progress --exclude "*.part" "$last_month" "$this_month" "$HOME/Downloads/Comics/"
docker run --interactive \ find "$HOME/Downloads/Comics/" -name "$(date --date '2 month ago' +'0-Day\ Week\ of\ %Y.%m.*')" -exec rm -r {} +
--publish-all \
--name "$repo" \
--rm \
--tty \
--volume "$HOME:$HOME" \
--volume "$root:$root" \
--user "$uid" \
--workdir "$PWD" "$repo:dev" /bin/sh -l
} }
sync_comics () { ddg () {
local this_month last_month lynx "https://duckduckgo.com/lite/?q=$(echo "$@" | urlencode)"
this_month="$( date '+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )"
last_month="$( date --date '1 month ago' '+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )"
rsync --recursive --compress --progress --exclude "*.part" "$last_month" "$this_month" "$HOME/Downloads/Comics/"
find "$HOME/Downloads/Comics/" -name "$(date --date '2 month ago' +''0-Day\ Week\ of\ %Y.%m.*)" -delete
} }
bfg () { toux () {
[ -f "$HOME/Downloads/bfg.jar" ] || curl 'https://search.maven.org/remote_content?g=com.madgag&a=bfg&v=LATEST' -sLo "$HOME/Downloads/bfg.jar" touch "$@"
java -jar "$HOME/Downloads/bfg.jar" "$@" chmod +x "$@"
} }
ddg () { match_ssl_pair () {
lynx "https://duckduckgo.com/lite/?q=$(echo "$@" | urlencode)" if [ "$#" -ne 2 ]
then
echo "Usage: match_ssl_pair private_key certificate"
return 1
fi
tempkey="$(mktemp)"
tempcert="$(mktemp)"
openssl pkey -pubout -outform PEM -in "$1" > "$tempkey"
openssl x509 -pubkey -noout -in "$2" > "$tempcert"
cmp "$tempkey" "$tempcert" > /dev/null
exitcode="$?"
rm "$tempkey" "$tempcert"
return "$exitcode"
}
flatpak-kill () {
if [ "$#" -lt 1 ]
then
echo "You must specify application name." >> /dev/stderr
false
else
name="$1"
shift
for pid in $(flatpak ps --columns=application,pid | awk "tolower(\$2) ~ /$name/ {print \$3}")
do
pkill "$@" "$pid"
done
fi
}
__run_duration () {
if [ -f "$HOME/.prerun.$$" ]
then
local endtime starttime
endtime="$(date +%s)"
starttime="$(cat "$HOME/.prerun.$$")"
rm "$HOME/.prerun.$$"
echo "$(( endtime - starttime ))"
else
echo 0
fi
}
__prerun () {
date +%s > "$HOME/.prerun.$$"
}
__prompt () {
local exitstatus="$?"
local runduration prompt
! [ "$(type history 2> /dev/null)" = "history is a shell builtin" ] || history -a
prompt=""
[ ! -f "$HOME/.prerun.$$" ] || runduration="$(__run_duration)"
[ "${runduration:-0}" -lt "10" ] || prompt="$(cyan -n "[Run duration: $runduration]") $prompt"
[ -n "${runduration:-}" ] || exitstatus='0'
[ "$exitstatus" = "0" ] || prompt="$(red -n "[Exit status: $exitstatus]") $prompt"
echo "$prompt"
} }
# shellcheck disable=SC1090 # shellcheck disable=SC1090
. "$HOME/Documents/Shore/bundle_certs/bundle_certs" . "$HOME/Documents/Shore/bundle_certs/bundle_certs"
if [ -n "${BASH:-}" ]
then
shopt -s checkwinsize
shopt -s cmdhist
# shellcheck disable=SC1091
[ -f /etc/bash_completion ] && . /etc/bash_completion
# shellcheck disable=SC1090
for sourcefile in $HOME/.bash_completion.d/*
do
[ ! -f "$sourcefile" ] || . "$sourcefile"
done
! command -v direnv > /dev/null || eval "$(direnv hook bash)"
fi
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias diff='diff --color=auto'
alias ip='ip -color'
alias less='less --raw-control-chars'
fi
prune_prerun
[apply]
whitespace = fix
[alias] [alias]
amend = commit --amend amend = commit --amend
autosquash = !GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash autorebase = -c 'core.editor=true' rebase -i --autosquash --autostash
bull = submodule update --remote --init bull = submodule update --remote --init
clear = clean -fdx cleaan = clean -fdX
cleaaan = clean -fdx
dif = diff --color-words dif = diff --color-words
empty-commit = commit --allow-empty empty-commit = commit --allow-empty
exec = "!exec " exec = "!${SHELL:-/bin/sh} -ic "
ff = merge --no-edit --ff-only master ff = merge --no-edit --ff-only master
fixup = commit --fixup fixup = !cd "${GIT_PREFIX:-$PWD}" && git commit --fixup $(git last-commit)
forget = reset HEAD^ forget = reset HEAD^
merg = merge --no-edit merg = merge --no-edit
pop = stash pop
posh = push --set-upstream origin HEAD posh = push --set-upstream origin HEAD
pul = pull --progress Pull = pull --progress --ff --tags
pull-force = !git fetch && git reset --hard "$(git tracking)" pull-force = !git fetch && git reset --hard "$(git tracking)"
push-force = push --force-with-lease pushes = !git remote | xargs -n1 git push
root = rev-parse --show-toplevel root = rev-parse --show-toplevel
serve-git = daemon --reuseaddr --verbose --base-path=. --export-all ./.git serve-git = daemon --reuseaddr --verbose --base-path=. --export-all ./.git
serve-http = !git update-server-info && cd .git && python -m SimpleHTTPServer serve-http = !git update-server-info && cd .git && python -m http.server 8080
shove = push --force-with-lease
squash = !cd "${GIT_PREFIX:-$PWD}" && git commit --squash $(git last-commit)
staash = stash --all staash = stash --all
stat = status --short --branch stat = status --short --branch
tag-version = !git tag -af "v$(cat VERSION)" tag-version = !git tag --annotate --force --message "v$(cat VERSION)" "v$(cat VERSION)"
tracking = rev-parse --abbrev-ref --symbolic-full-name @{upstream} tracking = rev-parse --abbrev-ref --symbolic-full-name @{upstream}
trigger = !git commit --allow-empty --no-edit --amend && git push --force-with-lease trigger = !git commit --allow-empty --no-edit --amend && git pushes --force-with-lease
update-requirements = !git stash save -a -u -q && ( git ls-files '*requirements*.txt' | xargs -n1 pur -r ) && ( git commit -a -m '- Updated requirements.' || echo 'No requirements updated.' ) && git stash pop
[color] [color]
grep = true grep = true
ui = auto
[core] [core]
excludesfile = ~/.gitignore_global whitespace = space-before-tab,-indent-with-non-tab,trailing-space
[diff] [diff]
renames = copies
tool = meld tool = meld
[difftool] [difftool]
prompt = false prompt = false
[fetch] [fetch]
fsckobjects = true fsckobjects = true
prune = true prune = true
[grep]
linenumber = true
[merge] [merge]
tool = meld tool = meld
ff = false ff = false
......
...@@ -11,8 +11,10 @@ Thumbs.db ...@@ -11,8 +11,10 @@ Thumbs.db
.svn/ .svn/
.sass-cache/ .sass-cache/
*.log *.log
a.out *.out
node-modules/ *.so
node_modules/
.npm/
nbproject/ nbproject/
*.ipynb *.ipynb
.idea/ .idea/
...@@ -22,7 +24,7 @@ nbproject/ ...@@ -22,7 +24,7 @@ nbproject/
.cache/ .cache/
bower_components/ bower_components/
*.class *.class
*.jar *.[ewj]ar
secring.* secring.*
.*.kate-swp .*.kate-swp
.swp.* .swp.*
...@@ -32,3 +34,16 @@ build/ ...@@ -32,3 +34,16 @@ build/
_build/ _build/
dist/ dist/
.tox/ .tox/
*.pdf
*.exe
*.dll
*.gz
*.tgz
*.tar
*.rar
*.zip
*.pid
*.lock
*.env
.bundle/
!Pipfile.lock
Subproject commit d9f2c7a9caf0076c011bbe0aa42fca641432ea57
.digrc 0 → 100644
+short
#!/bin/sh #!/bin/sh
set -eu set -eu
cd "$(git rev-parse --show-toplevel)" cd "$(git rev-parse --show-toplevel)"
echo Installing Git hooks echo Installing Git hooks >> /dev/stderr
Documents/bin/install-git-hooks Documents/bin/install-git-hooks
echo Generating SSH config echo Generating SSH config >> /dev/stderr
Documents/bin/gen-ssh-config Documents/bin/gen-ssh-config
echo Loading dconf config echo Loading dconf config >> /dev/stderr
Documents/bin/dconf-load Documents/bin/dconf-load
echo Configuring Git repo >> /dev/stderr
git config --local status.showUntrackedFiles no
echo Creating Bash completion scripts >> /dev/stderr
Documents/bin/gen-bash-completion
echo Adding Cron job >> /dev/stderr
Documents/bin/cron-jobs
* *
.bash_completion.d/.pipenv
.pre-commit/
.ssh/config
...@@ -21,3 +21,6 @@ ...@@ -21,3 +21,6 @@
[submodule "Documents/Shore/poquita"] [submodule "Documents/Shore/poquita"]
path = Documents/Shore/poquita path = Documents/Shore/poquita
url = https://www.shore.co.il/git/poquita url = https://www.shore.co.il/git/poquita
[submodule ".config/pythonrc"]
path = .config/pythonrc
url = https://github.com/lonetwin/pythonrc.git
.inputrc 0 → 100644
$include /etc/inputrc
set completion-ignore-case on
set show-all-if-ambiguous on
set visible-stats on
set skip-completed-text on
set colored-stats on
set colored-completion-prefix on
set blink-matching-paren on
set expand-tilde on
set history-preserve-point on
set mark-directories on
"\e[A": history-search-backward
"\e[B": history-search-forward
- repo: git://github.com/pre-commit/pre-commit-hooks ---
sha: v0.8.0 repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.4.0-1
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict - id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: flake8 - id: flake8
files: \.pythonstartup|Documents/Shore/cleanup/vagrant-.* exclude: pythonrc.py
- repo: https://www.shore.co.il/git/shell-pre-commit/ - repo: https://www.shore.co.il/git/shell-pre-commit/
sha: v0.5.4 rev: v0.6.0
hooks: hooks:
- id: shell-lint - id: shell-lint
files: &shellscripts 'bashrc|post-merge|profile|docker-|wifi-login|renew-certs|dma-clean|gen-ssh-config|dconf-load|install-git-hooks|pocketchip-battery|update-voltage' exclude: &excluded_shellscripts \.bash_completion\.d/(docker-machine\.bash|fabric-completion.bash|docker-compose)|\.travis/travis\.sh
- id: shellcheck - id: shellcheck
files: *shellscripts exclude: *excluded_shellscripts
include: .bashrc
from pprint import PrettyPrinter
pprint = PrettyPrinter().pprint
Compression yes Compression yes
ControlMaster auto ControlMaster auto
ControlPath ~/.ssh/%r@%h:%p.sock ControlPath ~/.ssh/%C.sock
ControlPersist 3m ControlPersist 3m
ServerAliveInterval 30 ServerAliveInterval 30
IdentitiesOnly yes IdentitiesOnly yes
......
# Bullguard
Host gitlab.dc.dojo-labs.com
HostName gitlab.dc.dojo-labs.com
User git
IdentityFile ~/.ssh/bullguard_ecdsa
Host 172.50.1.11
User ec2-user
Host 172.50.1.111
User ec2-user
Host 172.50.*.*
IdentityFile ~/.ssh/bullguard-prod_rsa
User ubuntu
Host 172.70.*.*
IdentityFile ~/.ssh/bullguard-dev_rsa
User ubuntu
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment