sudo apt purge nvidia-*
sudo apt autoremove
sudo reboot
--------------------------------
sudo apt remove --purge nvidia*
sudo dpkg --configure -a
sudo reboot
--------------------------------
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Waiting for docker daemon to start up:" | |
until docker ps 2>&1| grep STATUS>/dev/null; do sleep 1; done; >/dev/null | |
docker ps -a | grep sandbox-hdp | |
if [ $? -eq 0 ]; then | |
docker start sandbox-hdp | |
else | |
docker pull fonylew/sandbox-hdp-standalone:2.6.4-presto-0.202 | |
docker run --name sandbox-hdp --hostname "sandbox-hdp.hortonworks.com" --privileged -d \ | |
-p 15500:15500 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias usage='du -sh *|sort -n' | |
alias pubip="curl 'https://api.ipify.org'" | |
alias vbashal='vim ~/.bash_aliases' | |
alias vsshconfig='vim ~/.ssh/config' | |
alias sbashrc='source ~/.bashrc' | |
alias sourceme='source ~/.bashrc' | |
alias clipboard='xclip -selection clipboard' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update | |
sudo apt upgrade -y | |
# Essential | |
sudo apt install -y git python3-pip gcc cmake | |
# Networking tools | |
sudo apt install -y curl net-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update | |
sudo apt upgrade -y | |
# Essential | |
sudo apt install -y git python3-pip gcc cmake | |
# Networking tools | |
sudo apt install -y curl net-tools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First sudo command | |
sudo whoami | |
# Update and upgrade | |
sudo apt update | |
sudo apt upgrade -y | |
# Utility |
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
Solution: sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall
Ref: pypa/pip#5447 (comment)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function gen_pass(){ | |
default_len=13 | |
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-${1:-$default_len}};echo; | |
## OpenSSL random (alternatives: base64) | |
#openssl rand -base64 ${1:-$default_len} | colrm 17 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install python3.7 | |
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d --name rstudio -p [TARGET_PORT]:8787 -v $(pwd):/home/[USER]/[MOUNT_DIR] --restart=always -e ROOT=TRUE -e USER=[USER] -e PASSWORD=[PASSWORD] rocker/rstudio |