-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostCreateCommand.sh
28 lines (28 loc) · 1.24 KB
/
postCreateCommand.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# if [ -f requirements.txt* ]; then
# pip install -r requirements.txt
# else pip install pandas numpy matplotlib seaborn scikit-learn; fi
# fix permission issue
sudo chmod 777 /usr/local/lib/R/site-library/_cache/
# enable vscode R support
echo 'if (interactive() && Sys.getenv("RSTUDIO") == "") {
source(file.path(Sys.getenv(if (.Platform$OS.type == "windows") "USERPROFILE" else "HOME"), ".vscode-R", "init.R"))
}' >>~/.Rprofile
# add github hosts
# sudo sh -c 'curl https://hosts.gitcdn.top/hosts.txt >> /etc/hosts'
# use pak to install "rliger,Seurat,qs,targets"
# add library(tidyverse) and library(qs) to .Rprofile
echo 'options(defaultPackages=c(getOption("defaultPackages"), "tidyverse", "targets", "skimr", "gittargets"))' >>~/.Rprofile
echo 'options(languageserver.formatting_style = function(options) {
style <- styler::tidyverse_style(indent_by = options$tabSize)
style$token$force_assignment_op <- NULL
style
})' >>~/.Rprofile
touch ~/.lintr
echo 'linters: linters_with_defaults(
line_length_linter(120),
commented_code_linter = NULL
)' >>~/.lintr
# set git user name "h4rvey-g" and email "[email protected]"
git config --global user.name "h4rvey-g"
git config --global user.email "[email protected]"
export PATH=~/bin:$PATH