Skip to content
Commits on Source (6)
...@@ -75,11 +75,7 @@ export PATH="$HOME/Documents/bin:$PATH" ...@@ -75,11 +75,7 @@ export PATH="$HOME/Documents/bin:$PATH"
export PATH="$HOME/Repositories/Shore/ssh-ca:$PATH" export PATH="$HOME/Repositories/Shore/ssh-ca:$PATH"
export PATH="$HOME/Repositories/Shore/ssl-ca:$PATH" export PATH="$HOME/Repositories/Shore/ssl-ca:$PATH"
export PGSSLROOTCERT=/etc/ssl/certs/ca-certificates.crt export PGSSLROOTCERT=/etc/ssl/certs/ca-certificates.crt
PIPENV_DEFAULT_PYTHON_VERSION="$(python3 --version | grep -o '3\.[0-9]*')" > /dev/null 2>&1
export PIPENV_DEFAULT_PYTHON_VERSION
export PIPENV_MAX_DEPTH=5
export PS1='\u@\h:\w\$ ' export PS1='\u@\h:\w\$ '
export PYTHONSTARTUP=~/.config/pythonrc.py
export PYTHON_GITLAB_CFG=~/.config/python-gitlab.cfg export PYTHON_GITLAB_CFG=~/.config/python-gitlab.cfg
export REDISCLI_HISTFILE="$HOME/Documents/.rediscli_history" export REDISCLI_HISTFILE="$HOME/Documents/.rediscli_history"
export VAGRANT_DEFAULT_PROVIDER="virtualbox" export VAGRANT_DEFAULT_PROVIDER="virtualbox"
...@@ -119,9 +115,8 @@ alias gen-ssh-config="rc_make .ssh/config" ...@@ -119,9 +115,8 @@ alias gen-ssh-config="rc_make .ssh/config"
alias green="printf '\e[1;92m%s\e[0m\n'" alias green="printf '\e[1;92m%s\e[0m\n'"
alias hcl2json='json2hcl -reverse' alias hcl2json='json2hcl -reverse'
alias hostlocal='docker run --rm --privileged --net=host docker.io/gliderlabs/hostlocal' alias hostlocal='docker run --rm --privileged --net=host docker.io/gliderlabs/hostlocal'
alias http-server='python3 -m http.server 8080'
alias httpbin='gunicorn httpbin:app --bind 0.0.0.0:8080'
alias jjb='jenkins-jobs' alias jjb='jenkins-jobs'
alias kodi_scan="docker --host=ssh://kodi.shore.co.il exec poquita-poquita-1 kodi_scan"
alias l='ls -F' alias l='ls -F'
alias la='ls -AF' alias la='ls -AF'
alias lh='ls -lhAS' alias lh='ls -lhAS'
...@@ -161,8 +156,6 @@ alias nextcloudcmd='flatpak run --command=nextcloudcmd com.nextcloud.desktopclie ...@@ -161,8 +156,6 @@ alias nextcloudcmd='flatpak run --command=nextcloudcmd com.nextcloud.desktopclie
alias notify="notify --hint \"string:desktop-entry:$(basename "${GIO_LAUNCHED_DESKTOP_FILE:-io.elementary.terminal.desktop}")\"" alias notify="notify --hint \"string:desktop-entry:$(basename "${GIO_LAUNCHED_DESKTOP_FILE:-io.elementary.terminal.desktop}")\""
alias obsolete='apt list "~o"' alias obsolete='apt list "~o"'
alias occ='docker --host=ssh://host01.shore.co.il exec -itu www-data nextcloud-nextcloud-1 ./occ' alias occ='docker --host=ssh://host01.shore.co.il exec -itu www-data nextcloud-nextcloud-1 ./occ'
alias pip2='python2 -m pip'
alias pip3='python3 -m pip'
alias pre-commit-update-skel='pre-commit autoupdate --config ~/.config/git/skel/.pre-commit-config.yaml' alias pre-commit-update-skel='pre-commit autoupdate --config ~/.config/git/skel/.pre-commit-config.yaml'
# shellcheck disable=SC2139 # shellcheck disable=SC2139
alias rc_make="make --directory $HOME --always-make" alias rc_make="make --directory $HOME --always-make"
...@@ -173,7 +166,6 @@ alias restart-kodi='ssh kodi.shore.co.il "sudo systemctl kill --kill-who=all --s ...@@ -173,7 +166,6 @@ alias restart-kodi='ssh kodi.shore.co.il "sudo systemctl kill --kill-who=all --s
# shellcheck disable=SC2032 # shellcheck disable=SC2032
alias rm='rm --dir' alias rm='rm --dir'
alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete' alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete'
alias smtp-server='python3 -m smtpd -ndc DebuggingServer'
alias sudo="sudo " alias sudo="sudo "
alias sudome="sudome " alias sudome="sudome "
alias todo="vim \$HOME/Documents/TODO.yml" alias todo="vim \$HOME/Documents/TODO.yml"
...@@ -189,7 +181,6 @@ alias unsftp="sftp -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyCheckin ...@@ -189,7 +181,6 @@ alias unsftp="sftp -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyCheckin
alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking no\"" alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking no\""
alias update-requirements='find -name "*requirements*.txt" -exec pur --requirement {} \;' alias update-requirements='find -name "*requirements*.txt" -exec pur --requirement {} \;'
alias utcnow='date --utc --iso-8601=seconds' alias utcnow='date --utc --iso-8601=seconds'
alias venv='python3 -m venv'
# shellcheck disable=SC2139 # shellcheck disable=SC2139
alias wbr="ssh -t ns4.shore.co.il $(command -v wb)" alias wbr="ssh -t ns4.shore.co.il $(command -v wb)"
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'
...@@ -203,6 +194,13 @@ ansible_all () { ...@@ -203,6 +194,13 @@ ansible_all () {
popd popd
} }
bak () {
for x in "$@"
do
cp --preserve=all --reflink=auto "$x" "${x}~"
done
}
black8() { black8() {
black "$@" && flake8 "$@" black "$@" && flake8 "$@"
} }
...@@ -218,7 +216,7 @@ container_name() { ...@@ -218,7 +216,7 @@ container_name() {
} }
ddg () { ddg () {
w3m "https://duckduckgo.com/lite/?q=$(echo "$@" | urlencode)" w3m "https://lite.duckduckgo.com/lite/?q=$(echo "$@" | urlencode)"
} }
genpass () { genpass () {
...@@ -232,15 +230,6 @@ gen_csr () { ...@@ -232,15 +230,6 @@ gen_csr () {
openssl req -new -newkey rsa:4096 -nodes -out "$name.csr" -keyout "$name.key" openssl req -new -newkey rsa:4096 -nodes -out "$name.csr" -keyout "$name.key"
} }
jt () {
if command -v pygmentize > /dev/null
then
python3 -m json.tool "$@" | pygmentize -l json
else
python3 -m json.tool "$@"
fi
}
match_ssl_pair () { match_ssl_pair () {
if [ "$#" -ne 2 ] if [ "$#" -ne 2 ]
then then
......
# shellcheck shell=bash
# vim: ft=sh
PIPENV_DEFAULT_PYTHON_VERSION="$(python3 --version | grep -o '3\.[0-9]*')" > /dev/null 2>&1
export PIPENV_DEFAULT_PYTHON_VERSION
export PIPENV_MAX_DEPTH=5
export PYTHONSTARTUP=~/.config/pythonrc.py
alias http-server='python3 -m http.server 8080'
alias httpbin='gunicorn httpbin:app --bind 0.0.0.0:8080'
alias pip2='python2 -m pip'
alias pip3='python3 -m pip'
alias smtp-server='python3 -m smtpd -ndc DebuggingServer'
alias venv='python3 -m venv'
jt () {
if command -v pygmentize > /dev/null
then
python3 -m json.tool "$@" | pygmentize -l json
else
python3 -m json.tool "$@"
fi
}
pep582 () {
PIP_TARGET="${PWD}/__pypackages__"
export PIP_TARGET
PYTHONPATH="${PWD}/__pypackages__:${PYTHONPATH:-}"
export PYTHONPATH
}
...@@ -3,16 +3,13 @@ ...@@ -3,16 +3,13 @@
# SchooLinks infrastructure # SchooLinks infrastructure
Host ci.schoolinks.com Host ci.schoolinks.com
IdentityFile ~/.ssh/schoolinks_ci_rsa IdentityFile ~/Repositories/SchooLinks/sl-devops/secrets/ci
Host monitoring.schoolinks.com
IdentityFile ~/.ssh/schoolinks_apm_rsa
Host sftp*.schoolinks.com Host sftp*.schoolinks.com
IdentityFile ~/.ssh/schoolinks_sftp_rsa IdentityFile ~/Repositories/SchooLinks/sl-devops/secrets/sftp
Host firezone*.schoolinks.com Host firezone*.schoolinks.com
IdentityFile ~/.ssh/schoolinks_vpn_rsa IdentityFile ~/Repositories/SchooLinks/sl-devops/secrets/vpn
Host !firezone.schoolinks.com *.schoolinks.com 172.31.*.* 172.30.*.* 172.29.*.* Host !firezone.schoolinks.com *.schoolinks.com 172.31.*.* 172.30.*.* 172.29.*.*
ProxyCommand ssh firezone.schoolinks.com -W %h:%p ProxyCommand ssh firezone.schoolinks.com -W %h:%p
......
...@@ -11,7 +11,7 @@ wall () { ...@@ -11,7 +11,7 @@ wall () {
notify_send () { notify_send () {
message="$(cat)" message="$(cat)"
$(command -v notify-send) "$@" "$message" $(command -v notify-send) --icon terminal --app-name Terminal "$@" "$message"
} }
nextcloud () { nextcloud () {
...@@ -42,7 +42,7 @@ fi ...@@ -42,7 +42,7 @@ fi
case "$hostname" in case "$hostname" in
ElementaryOS) nextcloud;; ElementaryOS) nextcloud;;
YOGA-C930) notify_send "$@";; YOGA-C930|ThinkPad-T14s) notify_send "$@";;
host01) nextcloud;; host01) nextcloud;;
kodi) nextcloud;; kodi) nextcloud;;
mr8300) nextcloud;; mr8300) nextcloud;;
......
...@@ -20,17 +20,13 @@ ssh-keys: .ssh/github_ed25519 ...@@ -20,17 +20,13 @@ ssh-keys: .ssh/github_ed25519
ssh-keys: .ssh/shore_ecdsa ssh-keys: .ssh/shore_ecdsa
ssh-keys: .ssh/shore_ed25519 ssh-keys: .ssh/shore_ed25519
ssh-keys: .ssh/shore_rsa ssh-keys: .ssh/shore_rsa
ssh-keys: .ssh/schoolinks_apm_rsa
ssh-keys: .ssh/schoolinks_ci_rsa
ssh-keys: .ssh/schoolinks_dev_rsa ssh-keys: .ssh/schoolinks_dev_rsa
ssh-keys: .ssh/schoolinks_ed25519 ssh-keys: .ssh/schoolinks_ed25519
ssh-keys: .ssh/schoolinks_prod_rsa ssh-keys: .ssh/schoolinks_prod_rsa
ssh-keys: .ssh/schoolinks_rsa ssh-keys: .ssh/schoolinks_rsa
ssh-keys: .ssh/schoolinks_sftp_rsa
ssh-keys: .ssh/schoolinks_stable_rsa ssh-keys: .ssh/schoolinks_stable_rsa
ssh-keys: .ssh/schoolinks_staging_rsa ssh-keys: .ssh/schoolinks_staging_rsa
ssh-keys: .ssh/schoolinks_qa_rsa ssh-keys: .ssh/schoolinks_qa_rsa
ssh-keys: .ssh/schoolinks_vpn_rsa
.ssh/%_rsa: Documents/Database.kdbx .ssh/%_rsa: Documents/Database.kdbx
$(mkd) $(mkd)
......