Adding latest changes
This commit is contained in:
parent
b7fd37ba13
commit
a15b47444a
11
bash/bashrc
11
bash/bashrc
@ -146,7 +146,18 @@ if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null
|
|||||||
then
|
then
|
||||||
echo -e "${green} * ${nc} WSL env detected ..."
|
echo -e "${green} * ${nc} WSL env detected ..."
|
||||||
export DISPLAY=:0.0
|
export DISPLAY=:0.0
|
||||||
|
for i in $(pstree -np -s $$ | grep -o -E '[0-9]+')
|
||||||
|
do
|
||||||
|
if [[ -e "/run/WSL/${i}_interop" ]]
|
||||||
|
then
|
||||||
|
export WSL_INTEROP=/run/WSL/${i}_interop
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
export BROWSER=wslview
|
||||||
alias adb="/mnt/c/Android/android-sdk/platform-tools/adb.exe"
|
alias adb="/mnt/c/Android/android-sdk/platform-tools/adb.exe"
|
||||||
|
alias fastboot="/mnt/c/Android/android-sdk/platform-tools/fastboot.exe"
|
||||||
|
alias code="/mnt/c/Program\ Files/Microsoft\ VS\ Code/Code.exe"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "Ready${green}!${nc}"
|
echo -e "Ready${green}!${nc}"
|
||||||
|
6
bash/functions/enoclink/functions.sh
Normal file
6
bash/functions/enoclink/functions.sh
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
alias kubeazdev="kubectl config use-context moon-dev-enoc-link-k8s"
|
||||||
|
alias kubeazstaging="kubectl config use-context moon-staging-enoc-link-k8s"
|
||||||
|
alias kubeazprod="kubectl config use-context moon-prod-enoc-link-k8s"
|
||||||
|
alias updateazdev="az aks get-credentials --name moon-dev-enoc-link-k8s --resource-group moon-dev-enoc-link-rg"
|
||||||
|
alias updateazprod="az aks get-credentials --name moon-prod-enoc-link-k8s --resource-gro up moon-prod-enoc-link-rg"
|
||||||
|
alias updateazstaging="az aks get-credentials --name moon-staging-enoc-link-k8s --resour ce-group moon-staging-enoc-link-rg"
|
15
bash/functions/gerardo/functions.sh
Normal file
15
bash/functions/gerardo/functions.sh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
function check_cert {
|
||||||
|
curl --insecure -v https://$1 2>&1 | awk 'BEGIN { cert=0 } /^\* SSL connection/ { cert=1 } /^\*/ { if (cert) print }'
|
||||||
|
}
|
||||||
|
|
||||||
|
function cert_fingerprint {
|
||||||
|
openssl s_client -connect $1 |& openssl x509 -fingerprint -noout | awk -F '=' '{print $2}' | sed -e 's/://g' | tr [:upper:] [:lower:]
|
||||||
|
}
|
||||||
|
|
||||||
|
function vman {
|
||||||
|
vim <(man $1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function cpu {
|
||||||
|
ps -Ao user,comm,pid,pcpu,pmem,rss --sort=-pcpu | head -n 6
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
# Use common parameters for ssh into servers
|
# Use common parameters for ssh into servers
|
||||||
|
|
||||||
function sph {
|
function sph {
|
||||||
sshpass -p spr1ngw4t3r ssh \
|
sshpass -p spr1ngw4t3r ssh \
|
||||||
-o ChallengeResponseAuthentication=no \
|
-o ChallengeResponseAuthentication=no \
|
||||||
-o HostbasedAuthentication=no \
|
-o HostbasedAuthentication=no \
|
||||||
|
31
install.sh
31
install.sh
@ -1,7 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
packages="sshpass tmux python3-pip cargo vim-nox build-essential python3-dev \
|
packages="sshpass tmux python3-pip cargo vim-nox build-essential \
|
||||||
gcc-9 g++-9 python2 python2-dev guestfish libncurses-dev"
|
python3-dev gcc-9 g++-9 python2 python2-dev guestfish \
|
||||||
|
libncurses-dev python3.10-venv sqlite3 build-essential \
|
||||||
|
mono-complete libboost-dev, libfreeimage-dev bison flex \
|
||||||
|
ca-certificates curl apt-transport-https lsb-release gnupg\
|
||||||
|
qemu-system-arm"
|
||||||
|
|
||||||
pip="awscli cmake"
|
pip="awscli cmake"
|
||||||
|
|
||||||
@ -27,6 +31,20 @@ install_packages() {
|
|||||||
echo "Updating alternatives ..."
|
echo "Updating alternatives ..."
|
||||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
|
||||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
|
||||||
|
curl -sL https://packages.microsoft.com/keys/microsoft.asc | \
|
||||||
|
gpg --dearmor | \
|
||||||
|
sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
|
||||||
|
AZ_REPO=$(lsb_release -cs)
|
||||||
|
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | \
|
||||||
|
sudo tee /etc/apt/sources.list.d/azure-cli.list
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install azure-cli
|
||||||
|
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y kubectl
|
||||||
|
sudo apt-get upgrade
|
||||||
|
sudo apt-get autoremove
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,21 +54,27 @@ install_pip() {
|
|||||||
echo "Pip 3 detected, installing packages ..."
|
echo "Pip 3 detected, installing packages ..."
|
||||||
pip install --user -U $pip
|
pip install --user -U $pip
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_inputrc() {
|
||||||
if [[ -f ~/.dotfiles/inputrc ]]
|
if [[ -f ~/.dotfiles/inputrc ]]
|
||||||
then
|
then
|
||||||
echo "Installing inputrc ..."
|
echo "Installing inputrc ..."
|
||||||
rm -rf ~/.inputrc
|
rm -rf ~/.inputrc
|
||||||
ln -sf ~/.dotfiles/inputrc ~/.inputrc
|
ln -sf ~/.dotfiles/inputrc ~/.inputrc
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_bash() {
|
||||||
if [[ -f ~/.dotfiles/bash/bashrc ]]
|
if [[ -f ~/.dotfiles/bash/bashrc ]]
|
||||||
then
|
then
|
||||||
echo "Dotfiles bashrc found, linking it ..."
|
echo "Dotfiles bashrc found, linking it ..."
|
||||||
rm -rf ~/.bashrc
|
rm -rf ~/.bashrc
|
||||||
ln -sf ~/.dotfiles/bash/bashrc ~/.bashrc
|
ln -sf ~/.dotfiles/bash/bashrc ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_tmux() {
|
||||||
if [[ -f ~/.dotfiles/tmux/tmux.conf ]]
|
if [[ -f ~/.dotfiles/tmux/tmux.conf ]]
|
||||||
then
|
then
|
||||||
echo "Dotfiles tmux.conf found, linking it ..."
|
echo "Dotfiles tmux.conf found, linking it ..."
|
||||||
@ -152,6 +176,9 @@ then
|
|||||||
else
|
else
|
||||||
install_packages
|
install_packages
|
||||||
install_pip
|
install_pip
|
||||||
|
setup_inputrc
|
||||||
|
setup_bash
|
||||||
|
setup_tmux
|
||||||
install_starship
|
install_starship
|
||||||
setup_starship
|
setup_starship
|
||||||
setup_ssh
|
setup_ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user