From 8dc3d28103b53604d2cb013506759040857bcdd7 Mon Sep 17 00:00:00 2001 From: Dirk Sarpe <dirk.sarpe@idiv.de> Date: Tue, 7 Mar 2017 07:35:23 +0100 Subject: [PATCH] fix syntax and improve readability --- 20170306_stammtisch.md | 58 +++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/20170306_stammtisch.md b/20170306_stammtisch.md index 3396d70..97ea46e 100644 --- a/20170306_stammtisch.md +++ b/20170306_stammtisch.md @@ -19,44 +19,50 @@ - tmux and vim, have a look at https://git.idiv.de/scientific-computing/RStudio-Docu/blob/master/tmux.md - search for tmux, vim and python PEP8 - use ! to execute commands from inside vim on the command line, e.g. the following will run wc on the current file - {{{ - :! wc % - }}} + + ``` + :! wc % + ``` - search for dotfiles ## Maria, ask git when a line of code did change -git will tell you in which commit a file changed -{{ -git log dotfile.yml -}}} +- git will tell you in which commit a file changed + + ``` + git log dotfile.yml + ``` +- git will tell you when the line range in a file changed + ``` + git log -L 10,12:dotfile.yml + ``` -git will tell you when the line range in a file changed -{{{ -git log -L 10,12:dotfile.yml -}}} +- git will tell you when a function in a file changed -git will tell you when a function in a file changed -{{{ -git log -L :is_workday:analysis.r -}}} + ``` + git log -L :is_workday:analysis.r + ``` ## Maria how to check out individual file (with a new name) -{{{ -git checkout 14134e6 muhkuh -}}} +- tell git to checkout file from commit (overwrites current version) + ``` + git checkout 14134e6 muhkuh + ``` -or to a new file (mind the :) -{{{ -git checkout 14134e6:muhkuh > newkuh -}}} +- or checkout to a new file (mind the :) + + ``` + git checkout 14134e6:muhkuh > newkuh + ``` ## Christian how to add users to a group in Linux -{{{ -usermod -a -G groupName userName -}}} +- append a group to the groups a user is member of + + ``` + usermod -a -G groupName userName + ``` ## Christian file directory structure in Linux -Why do you need a /? +Why do you need a `/`? - Everything starts at / (say root). - Your user usually has a home directory like /home/username -- GitLab