Last active
November 5, 2019 09:56
-
-
Save mribeirodantas/3d38f6e8174289e13a7f782bd4a1a4af to your computer and use it in GitHub Desktop.
Script to set the machine for work
This file contains hidden or 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
# In my machine, the content below is saved to /usr/local/bin/setup_work_env | |
# Run with sudo | |
#!/usr/bin/bash | |
# Set proxy for package management in Ubuntu | |
echo 'Acquire { | |
HTTP::proxy "http://www-cache:3128"; | |
HTTPS::proxy "http://www-cache:3128"; | |
}' > /etc/apt/apt.conf.d/proxy.conf | |
# Set proxy for R | |
echo 'http_proxy=www-cache:3128 | |
https_proxy=www-cache:3128' > /home/mribeirodantas/.Renviron | |
# Set wifi card off (Ethernet use only at work) | |
nmcli radio wifi off | |
# After having created the proxy in the config menu | |
# Turn it to manual | |
gsettings set org.gnome.system.proxy mode 'manual' | |
# Set proxy for Git | |
git config --global http.proxy www-cache:3128 | |
git config --global https.proxy www-cache:3128 | |
# SOCKS Tunnel through my private server so I can | |
# access sites like Sci-Hub at work | |
ssh -D 8123 -f -C -q -N mribeirodantas@my-personal-website-ip-address |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment