Pages in Cheatsheet

Docker Cheatsheet


Container vs Image Image is immutable, container is a box running starting from an image. docker ps -as # list all containers with sizes docker images # list all images docker run [options] <image> # best to use image id or image:tag # -p hostPort:containerPort expose port, -P publish all exposed ports. 8888 for jupyter notebook # -t terminal pseudo-TTY # -i Keep STDIN open even if not attached # -v /host/dir:/<container-path> # –name Assign a name to the container docker start -ai <container> # can user container id or name # -a Attach STDOUT/STDERR and forward signals # -i Attach container’s STDIN jupyter notebook –ip 0.

Mac Cheatsheet


Keboard Shortcuts Switching tabs: Safari, [shift]+ctrl+tab, cmd+number, shift+cmd+left/right. Chrome, [shift]+ctrl+tab, cmd+number, alt+cmd+left/right. macvim, shift+cmd+{/}. Editing: Delete to end of line, ctrl+k, same as on command line Delete to beginning of line, cmd+shift+left, then delete

Git Cheatsheet


Basic Snapshotting git-mv - Move or rename a file, a directory, or a symlink git mv [-v] [-f] [-n] [-k] <source> <destination> rename git mv [-v] [-f] [-n] [-k] <source> … <destination directory> move into existing directory git mv <source> <destination> # rename a directory Branch Related git branch [options] <branchname> git branch # show all branches with current marked with * git branch -vv # show all local and tracked remote branches git checkout dev git branch jesse # creates branch named "jesse" off from "dev" branch git checkout -b jesse # creates and switch to branch "jesse" Merge git merge [options] [<commit>.

Vim Cheatsheet


For Ubuntu Linux, Terms: C-x stands for ctrl-x. Generally, use :help <cmd>" for quick ref, e.g.:help undo`. Configuration Configuration file default ~/.vimrc. Can use source <another file> and put the actual vimrc in cloud like dropbox.

to reload an edited vimrc :so $MYVIMRC File operations # to rename a file :E or :Explorer :Te or :Texplorer to open explorer in new tab then :bd to close the new tab R # rename at bottom :bp # go back previous buffer # save the current session including buffers, tabs, and settings :mksession ~/vimSessions/session1.


Linux Cheatsheets


Linux Commands Cheatsheet Files Related ls - list directory contents SYNOPSIS ls [OPTION]… [FILE]… -a, –all do not ignore entries starting with . examples effects ls -la list all file/directories including hidden in long list form ls -ld list directory only in list form du - estimate file space usage SYNOPSIS du [OPTION]… [FILE]… -c, –total produce a grand total -h, –human-readable print sizes in human readable format (e.