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 | |
# this goes in /etc/acpi/ | |
# also run sudo chmod +x /etc/acpi/cancel-white-noise.sh | |
amixer -c0 sset 'Headphone Mic Boost' 10dB |
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
#library(devtools) | |
#install_github("andrie/version.compare") | |
library(data.table) | |
library(dplyr) | |
library(version.compare) | |
scale.factor = 1.0 | |
r = switch( |
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
#library(devtools) | |
#install_github("andrie/version.compare") | |
library(data.table) | |
library(dplyr) | |
library(version.compare) | |
scale.factor = 1.0 | |
r = switch( |
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
#export RSTUDIO_WHICH_R=/usr/bin/R | |
export RSTUDIO_WHICH_R=/opt/R/R-3.4.2-intel-mkl/bin/R | |
#export RSTUDIO_WHICH_R=/opt/R/R-3.4.2-openblas/bin/R | |
#export RSTUDIO_WHICH_R=/opt/R/R-3.4.2-defaults/bin/R | |
#export RSTUDIO_WHICH_R=/opt/microsoft/ropen/3.4.2/lib64/R/bin/R |
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
# 1: Add RStudio to apt sources | |
# key added after sudo apt-get update returned a warning following this guide: https://support.rstudio.com/hc/en-us/articles/218004217-Building-R-from-source | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9 | |
printf '#CRAN mirror\ndeb https://cran.rstudio.com/bin/linux/ubuntu artful/\ndeb-src https://cran.rstudio.com/bin/linux/ubuntu artful/\n' | sudo tee -a /etc/apt/sources.list.d/cran-mirror.list | |
# 2: Enable development repositories | |
# you need to enable multiverse repo or packages as xvfb won't be found | |
printf 'deb http://us.archive.ubuntu.com/ubuntu artful main restricted universe multiverse |
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
# 1: Add RStudio to apt sources | |
# key added after sudo apt-get update returned a warning following this guide: https://support.rstudio.com/hc/en-us/articles/218004217-Building-R-from-source | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9 | |
printf '#CRAN mirror\ndeb https://cran.rstudio.com/bin/linux/ubuntu artful/\ndeb-src https://cran.rstudio.com/bin/linux/ubuntu artful/\n' | sudo tee -a /etc/apt/sources.list.d/cran-mirror.list | |
# 2: Enable development repositories | |
# you need to enable multiverse repo or packages as xvfb won't be found | |
printf 'deb http://us.archive.ubuntu.com/ubuntu artful main restricted universe multiverse |
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
cd ~/GitHub/r-with-intel-mkl/ | |
rm -rf R-3.4.2 | |
tar xzvf R-3.4.2.tar.gz | |
cd R-3.4.2 | |
./configure --prefix=/opt/R/R-3.4.2-defaults --enable-R-shlib | |
make && sudo make install | |
printf 'export RSTUDIO_WHICH_R=/opt/R/R-3.4.2-defaults/bin/R\n' | tee -a ~/.profile |
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
cd ~/GitHub/r-with-intel-mkl | |
wget https://mran.blob.core.windows.net/install/mro/3.4.2/microsoft-r-open-3.4.2.tar.gz | |
tar xzvf microsoft-r-open-3.4.2.tar.gz | |
cd microsoft-r-open | |
sudo ./install.sh | |
printf 'export RSTUDIO_WHICH_R=/opt/microsoft/ropen/3.4.2/lib64/R/bin/R\n' | tee -a ~/.profile | |
# it was not possible to start /opt/microsoft/ropen/3.4.2/lib64/R/bin/R | |
# the error is: | |
# *** caught segfault *** |
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-get remove r-base r-base-dev | |
sudo apt-get remove 'r-cran.*' | |
sudo apt-get autoclean && sudo apt-get autoremove | |
sudo apt-get build-dep r-base | |
sudo rm -rf /opt/R/R-3.4.2-openblas | |
sudo rm -rf /opt/R/R-3.4.2-defaults | |
sudo ln -s /opt/R/R-3.4.2-intel-mkl/bin/R /usr/bin/R |
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
# remove installed user packages | |
rm -rf ~/R | |
# create new user packages directory | |
mkdir ~/R/ | |
mkdir ~/R/x86_64-pc-linux-gnu-library/ | |
mkdir ~/R/x86_64-pc-linux-gnu-library/3.4 | |
# install common packages | |
R --vanilla << EOF |