Browse Source

[zsh] De-sure everything

Colin Powell 3 months ago
parent
commit
99a902178b
3 changed files with 1 additions and 81 deletions
  1. 0 4
      bash/.aliases
  2. 1 3
      ssh/.ssh/config
  3. 0 74
      zsh/.zshrc

+ 0 - 4
bash/.aliases

@@ -11,13 +11,9 @@ alias pandora="ssh pandora.unbl.ink"
 alias bastion="ssh bastion.unbl.ink"
 alias pull="git pull --rebase --autostash"
 alias push="git push"
-alias asso="aws sso login --profile $*"
-alias qaeks="aws eks update-kubeconfig --name farmers-qa-k8s-use1 --profile $*"
 alias bookpull="rsync -aziuvhP root@rhea.local:/tank/books/ ~/.calibre/"
 alias bookpush="rsync -aziuvhP ~/.calibre/ root@rhea.local:/tank/books/"
 alias chglg="git add ./changelog/ && git commit -m 'Add changelog' && git push"
-alias surepayment="portforward 5001"
-alias sureroc="portforward 5002"
 alias slip="sli dev changelog"
 alias vdeploy="ssh life.unbl.ink \"rm -rf /root/vrobbler-venv/lib/python3.11/site-packages/vrobbler-0.15.4.dist-info/ && pip install git+https://code.unbl.ink/secstate/vrobbler.git@develop && systemctl restart vrobbler\""
 alias vsh="ssh life.unbl.ink vrobbler shell_plus"

+ 1 - 3
ssh/.ssh/config

@@ -16,14 +16,12 @@ Host github.com
     IdentityFile ~/.ssh/2022_git
 
 # Home Gitea account:
-Host code.unbl.ink git.service 192.168.40.244
+Host code.unbl.ink git.service 192.168.40.244 gogs*
   User git
   IdentityFile ~/.ssh/2024_git
   PreferredAuthentications publickey
   PasswordAuthentication no
   IdentitiesOnly yes
-
-Host gogs*
   Port 222
 
 # Mailinabox uses root by default

+ 0 - 74
zsh/.zshrc

@@ -9,8 +9,6 @@ ZSH_THEME="robbyrussell"
 
 plugins=(git z fzf asdf direnv yarn)
 
-eval "$(aws configure export-credentials --profile np-farmers --format env)"
-
 source $ZSH/oh-my-zsh.sh
 
 # See ~/.aliases for the various aliases seen in here
@@ -27,79 +25,7 @@ yayup () {
   mv ~/.asdf.bak ~/.asdf
 }
 
-repo_go() {
-  asso registries-read
-  export PRIVATE_REPO_TOKEN="$(aws codeartifact get-authorization-token --domain sure --query authorizationToken --output text --profile registries-read)"
-  export CODEARTIFACT_AUTH_TOKEN="$PRIVATE_REPO_TOKEN"
-  poetry config http-basic.codeartifact aws $PRIVATE_REPO_TOKEN
-  aws codeartifact login --namespace sureapp --tool npm --repository npm --domain sure --domain-owner 348777858795 --profile registries-read
-}
-
-ghlogin() {
-  npm login --registry=https://npm.pkg.github.com --scope=@sureapp
-}
-
-poetry-install() {
-  repo_go
-  poetry install
-}
-
-sush() {
-  if [[ $1 == "sbx" ]]
-  then
-    asso sure-inc
-    aws eks update-kubeconfig --name surepreme-sandbox-k8s-use1 --profile $argv
-    kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash
-  fi
-
-  if [[ $1 == "qa" ]]
-  then
-    qaeks np-farmers
-    kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash
-  fi
-
-  if [[ $1 == "prod" ]]
-  then
-    asso sure-inc
-    aws eks update-kubeconfig --name surepreme-production-k8s-use1 --profile sure-inc
-    kubectl exec -it -n bastion $(kubectl get pod -n bastion | grep "surepreme.*bastion" | head -n 1 | awk '{print $1}') -- bash
-  fi
-}
-
-portforward() {
-    asso np-farmers
-    qaeks np-farmers
-    kubectl port-forward $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) $1:8080
-}
-
-alias qa="sush qa"
-alias sbx="sush sbx"
-alias prod="sush prod"
-
-prep_pg_for_sure() {
-    psql -U sure postgres -c "CREATE USER sure SUPERUSER"
-    psql -U sure postgres -c "CREATE USER surepremeroot SUPERUSER"
-    psql -U sure postgres -c "CREATE USER rdsadmin SUPERUSER"
-}
-refresh_sure_db() {
-    echo "This will likely take about 10 minutes"
-    #asso np-farmers
-    #aws s3 cp --profile np-farmers s3://farmers-qa-rds-exports/pg_dumps/farmers_latest.pgdump /tmp/qa_farmers_latest.pgdump
-    dropdb -U sure surepreme --force
-    createdb -U sure surepreme
-    psql -U sure surepreme -c "CREATE EXTENSION postgis"
-    pg_restore -d surepreme /tmp/qa_farmers_latest.pgdump
-    #rm /tmp/qa_farmers_latest.pgdump
-    echo "Database `surepreme` successfully restores from QA data"
-}
-
-[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
-
-for f in ~/.dotfiles.sure/bash/*.sh; do source $f; done
-for f in ~/.dotfiles.sure/direnv/*.sh; do source $f; done
-
 eval "$(atuin init zsh)"
-export AWS_PROFILE=sure-inc
 
 local hostname="%{$fg_bold[white]%}%m"