[fish] Update functions from sure
This commit is contained in:
3
fish/.config/fish/functions/al.fish
Normal file
3
fish/.config/fish/functions/al.fish
Normal file
@ -0,0 +1,3 @@
|
||||
function al
|
||||
aws sso login --profile $argv
|
||||
end
|
||||
5
fish/.config/fish/functions/dnsupdate.fish
Normal file
5
fish/.config/fish/functions/dnsupdate.fish
Normal file
@ -0,0 +1,5 @@
|
||||
function dnsupdate
|
||||
for arg in $argv
|
||||
curl -X PUT "https://box.unbl.ink/admin/dns/custom/$arg.unbl.ink" --user colin@unbl.ink:$(pass personal/colin@unbl.ink)
|
||||
end
|
||||
end
|
||||
3
fish/.config/fish/functions/k.fish
Normal file
3
fish/.config/fish/functions/k.fish
Normal file
@ -0,0 +1,3 @@
|
||||
function k
|
||||
kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash -c "python manage.py shell"
|
||||
end
|
||||
4
fish/.config/fish/functions/kc.fish
Normal file
4
fish/.config/fish/functions/kc.fish
Normal file
@ -0,0 +1,4 @@
|
||||
function kc
|
||||
echo "from platform_core.apps.core_protections.models import *" | pbcopy
|
||||
kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash -c "python manage.py shell"
|
||||
end
|
||||
28
fish/.config/fish/functions/kush.fish
Normal file
28
fish/.config/fish/functions/kush.fish
Normal file
@ -0,0 +1,28 @@
|
||||
function kush
|
||||
|
||||
switch $argv[1]
|
||||
case "sbx"
|
||||
aws eks update-kubeconfig --name surepreme-sandbox-main-cluster --profile sure-inc
|
||||
case "qa"
|
||||
aws eks update-kubeconfig --name farmers-qa-main-cluster --profile np-farmers
|
||||
case "prod"
|
||||
echo "from platform_core.apps.core_protections.models import *" | pbcopy
|
||||
aws eks update-kubeconfig --name surepreme-production-main-cluster --profile sure-inc
|
||||
kubectl exec -it -n bastion $(kubectl get po -n bastion | grep "surepreme.*bastion" | head -n 1 | awk '{print $1}') -- python manage.py shell
|
||||
end
|
||||
|
||||
if test (count $argv) -gt 1
|
||||
if [ $argv[2] = "-p" ]
|
||||
echo "Import command is on your clipboard"
|
||||
echo "from platform_core.apps.core_protections.models import *" | pbcopy
|
||||
kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash -c "python manage.py shell"
|
||||
else
|
||||
kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash
|
||||
end
|
||||
else
|
||||
kubectl exec -it $(kubectl get pods | fzf | awk '{print $1}'|head -n 1) -- bash
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
3
fish/.config/fish/functions/pt.fish
Normal file
3
fish/.config/fish/functions/pt.fish
Normal file
@ -0,0 +1,3 @@
|
||||
function pt
|
||||
poetry run pytest $argv
|
||||
end
|
||||
@ -1 +1,3 @@
|
||||
aws codeartifact login --namespace sureapp --tool npm --repository npm --domain sure --domain-owner 348777858795 --profile $AWS_PROFILE
|
||||
function sure-npm-token
|
||||
aws codeartifact login --namespace sureapp --tool npm --repository npm --domain sure --domain-owner 348777858795 --profile $argv
|
||||
end
|
||||
|
||||
@ -1 +1,3 @@
|
||||
aws codeartifact login --namespace sureapp --tool npm --repository npm --domain sure --domain-owner 348777858795 --profile $AWS_PROFILE
|
||||
function sure-npm-token
|
||||
aws codeartifact login --namespace sureapp --tool npm --repository npm --domain sure --domain-owner 348777858795 --profile $argv
|
||||
end
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
function sure-set-token
|
||||
set -x PRIVATE_REPO_TOKEN "$(aws codeartifact get-authorization-token --domain sure --query authorizationToken --output text --profile registries-read)"
|
||||
set -Ux PRIVATE_REPO_TOKEN "$(aws codeartifact get-authorization-token --domain sure --query authorizationToken --output text --profile registries-read)"
|
||||
set -Ux 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
|
||||
end
|
||||
|
||||
3
fish/.config/fish/functions/v.fish
Normal file
3
fish/.config/fish/functions/v.fish
Normal file
@ -0,0 +1,3 @@
|
||||
function v
|
||||
fzf --bind 'enter:become(vim {})'
|
||||
end
|
||||
Reference in New Issue
Block a user