Skip to content
Commits on Source (6)
......@@ -75,11 +75,7 @@ export PATH="$HOME/Documents/bin:$PATH"
export PATH="$HOME/Repositories/Shore/ssh-ca:$PATH"
export PATH="$HOME/Repositories/Shore/ssl-ca:$PATH"
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 PYTHONSTARTUP=~/.config/pythonrc.py
export PYTHON_GITLAB_CFG=~/.config/python-gitlab.cfg
export REDISCLI_HISTFILE="$HOME/Documents/.rediscli_history"
export VAGRANT_DEFAULT_PROVIDER="virtualbox"
......@@ -119,9 +115,8 @@ alias gen-ssh-config="rc_make .ssh/config"
alias green="printf '\e[1;92m%s\e[0m\n'"
alias hcl2json='json2hcl -reverse'
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 kodi_scan="docker --host=ssh://kodi.shore.co.il exec poquita-poquita-1 kodi_scan"
alias l='ls -F'
alias la='ls -AF'
alias lh='ls -lhAS'
......@@ -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 obsolete='apt list "~o"'
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'
# shellcheck disable=SC2139
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
# shellcheck disable=SC2032
alias rm='rm --dir'
alias screenshot-cleanup='find "$HOME/Pictures" -name "Screenshot from *.png" -delete'
alias smtp-server='python3 -m smtpd -ndc DebuggingServer'
alias sudo="sudo "
alias sudome="sudome "
alias todo="vim \$HOME/Documents/TODO.yml"
......@@ -189,7 +181,6 @@ alias unsftp="sftp -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyCheckin
alias unssh="ssh -o \"UserKnownHostsFile /dev/null\" -o \"StrictHostKeyChecking no\""
alias update-requirements='find -name "*requirements*.txt" -exec pur --requirement {} \;'
alias utcnow='date --utc --iso-8601=seconds'
alias venv='python3 -m venv'
# shellcheck disable=SC2139
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'
......@@ -203,6 +194,13 @@ ansible_all () {
popd
}
bak () {
for x in "$@"
do
cp --preserve=all --reflink=auto "$x" "${x}~"
done
}
black8() {
black "$@" && flake8 "$@"
}
......@@ -218,7 +216,7 @@ container_name() {
}
ddg () {
w3m "https://duckduckgo.com/lite/?q=$(echo "$@" | urlencode)"
w3m "https://lite.duckduckgo.com/lite/?q=$(echo "$@" | urlencode)"
}
genpass () {
......@@ -232,15 +230,6 @@ gen_csr () {
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 () {
if [ "$#" -ne 2 ]
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 @@
# SchooLinks infrastructure
Host ci.schoolinks.com
IdentityFile ~/.ssh/schoolinks_ci_rsa
Host monitoring.schoolinks.com
IdentityFile ~/.ssh/schoolinks_apm_rsa
IdentityFile ~/Repositories/SchooLinks/sl-devops/secrets/ci
Host sftp*.schoolinks.com
IdentityFile ~/.ssh/schoolinks_sftp_rsa
IdentityFile ~/Repositories/SchooLinks/sl-devops/secrets/sftp
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.*.*
ProxyCommand ssh firezone.schoolinks.com -W %h:%p
......
......@@ -11,7 +11,7 @@ wall () {
notify_send () {
message="$(cat)"
$(command -v notify-send) "$@" "$message"
$(command -v notify-send) --icon terminal --app-name Terminal "$@" "$message"
}
nextcloud () {
......@@ -42,7 +42,7 @@ fi
case "$hostname" in
ElementaryOS) nextcloud;;
YOGA-C930) notify_send "$@";;
YOGA-C930|ThinkPad-T14s) notify_send "$@";;
host01) nextcloud;;
kodi) nextcloud;;
mr8300) nextcloud;;
......
......@@ -20,17 +20,13 @@ ssh-keys: .ssh/github_ed25519
ssh-keys: .ssh/shore_ecdsa
ssh-keys: .ssh/shore_ed25519
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_ed25519
ssh-keys: .ssh/schoolinks_prod_rsa
ssh-keys: .ssh/schoolinks_rsa
ssh-keys: .ssh/schoolinks_sftp_rsa
ssh-keys: .ssh/schoolinks_stable_rsa
ssh-keys: .ssh/schoolinks_staging_rsa
ssh-keys: .ssh/schoolinks_qa_rsa
ssh-keys: .ssh/schoolinks_vpn_rsa
.ssh/%_rsa: Documents/Database.kdbx
$(mkd)
......