Intro reading: two articles on "command line bullshittery" (the original post by Philip Guo that introduced this term is no longer available, alas …) (Also see [1])
^C
/^V
), navigation, create/copy/remove, grep
and basic find
, basic pipes and filters. touch
, wc
, cat
, head
/tail
, cut
(briefly), nano
/vi
(briefly), man
pages (briefly), less
/more
(briefly). SC shell introduction sections 1-4.. myscript
vs ./myscript
)$()
xargs
find ... -exec
)for
loopsssh
, including RSA keys (here is more info than you really wanted on SSH key exchange)scp
vs. rsync
vs. wget
vs curl
(curl vs wget)session 4:
screen
, tmux
etc.
&
/bg
/fg
/^Z
jobs
top
, htop
, ps
which
.tar
, .tar.gz
, .tgz
); tar
, g(un)zip
, configure
/make
/make install
apt
/yum
(Linux), homebrew/MacPorts/fink(MacOS), cygwin
/WSL
/? (Windows)renv
)docker ps; docker exec -it <container_id or name> bash
)sudo groupadd docker; sudo usermod -aG docker $USER; newgrp docker
; (may need to log out & back in/start a new shell?)docker run --rm -ti rocker/r-base
(--rm
cleans up, t
== start a terminal, i
== interactive)
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
, listen to this message and add this prefix
winpty docker run --rm -ti rocker/r-base
docker run --rm -p 8787:8787 -e PASSWORD=definitelysecure rocker/verse
followed by pointing browser to localhost:8787
orpurrr
is an R package, part of the tidyverse. It is the tidyverse's machinery for functional programming. The name "purrr" comes from the idea of "pure functions" (functions that take an argument and return a value and have no side effects), which are important in functional programming.
The main functions in purrr
are map()
and variations; "map" is a term from functional programming, which means "apply a function to a list of objects". map()
is the equivalent of lapply()
("list apply") in base R. It also has a lot of other commands for working with lists (see the cheatsheet)
debug
package (Bravington, archived
remotes::install_version("debug", "1.3.1"
)cat()
traceback()
: understanding the call stackdebug()
: debugging mode (also debugonce
)
browser()
: setting breakpointoptions(error = recover)
: debug on erroroptions(warn = 2)
: promote warnings to errorssetBreakpoint("filename#linenum")
(front end to trace()
)Q
, undebug()
, `options(error = NULL, warn = 1)Primary reading: testing chapter from the Digital Science Center (DiSC) at Universität Innsbruck.
all.equal
etc.; tolerances)waldo::compare
testthat
, tinytest
(see here), tinysnapshotand "In the Beginning was the Command Line", an optional, ancient, very long essay by Neal Stephenson ↩︎