Misc tips

Close Lid & Sleep

  • src

    Trash in linux

    rm -rf ~/.local/share/Trash/*
    

    using trash-cli

    sudo apt install trash-cli
    trash-empty
    

    vscode tips

  • ctrl+tab : switching tabs
  • ctrl+p : shows recently opened files
  • disable certain vim commands:
    "vim.handleKeys": {
          "<C-w>": false
      }
    
  • Ctrl+shift+V: markdown preview - toggle
  • Ctrl+K+V: markdown preview on the side
    • don’t work well due to Vim binding
    • Just use C-Shft-P toggle and type preview on the side
  • more markdown on vscode
  • Window Management
  • swtich between splitted window: Ctrl+1, Ctrl+2
  • Toggle minimap option

    rsync

    rsync -avzh jihyunyang@mio.mines.edu:/[some directory] ~/[some my local directory]
    
  • rsync explanation
  • somehow, I still don’t know how to send from remote to local.
  • how local can know my ip address and so on?

    Python

  • Null equivalent: None

    grep

  • ls -al grep [smthing]
  • and it is case sensitive

how to use crontab

  • source
  • Alt + Tilde(Can be moved in same application too)
  • <C+shift+T>: new tab
  • <alt+num>: moving tab
  • <C+pgdn>: also moving tab. toggling

    Find pattern containing files

  • source
    grep -rnw '/path/to/somewhere/' -e 'pattern'
    

    Adding Hibernation shortcut

  • Test in terminal
  • systemtcl suspend -i

    linux - Watch & tail

    watch -n 5 -d cat log.txt
    
  • exit by
    ln -s [orgin] [name of symlink]
    
  • “ctrl p”
  • src
  • src2
  • src3
    Up     Ctrl+P
    Down   Ctrl+N
    Left   Ctrl+B
    Right  Ctrl+F
    Home   Ctrl+A
    End    Ctrl+E
    Delete Ctrl+D
    Clean  Ctrl+I or clear
    
One word back Alt+b
One word fwd  Alt+f
Exit Graphical Sesssion Ctrl+Alt+F1
  • replay history: e.g) !1626
  • cutting and pasting
    Yank   Ctrl+Y
    Delete   Ctrl+U
    

Disable vscodeVim

  • edit settings.json

open new terminal from vscode

  • ctrl shift c

    set new volume from terminal

    amixer sset 'Master' 50%
    

    Fixed Schedule

  • src

update

sudo apt-get update && sudo apt-get upgrade 
sudo apt-get dist-upgrade

bash prompt howto

  • src
  • counting files
    ls -l | wc -l