====== [DOC] the FREAK cheatsheet ======
systemctl/mail/vim/tmux/screen/vimperator/finch
====== fail2ban ======
Using ''fail2ban-client'':
^ ############## ** command ** ############## ^ ------------------------------------------------------------------ ^
| ''fail2ban-client status'' | status of the server |
| ''fail2ban-client banned'' | List banned addresses |
| ''fail2ban-client unban '' | Unban '''' address |
| ''fail2ban-client unban --all'' | Unban all |
| ''fail2ban-client set banip '' | Ban '''' inside ''''|
====== firewall-cmd ======
^ ############## ** command ** ############## ^ ------------------------------------------------------------------ ^
| ''firewall-cmd --state'' | status of the server |
| ''firewall-cmd --get-active-zones'' | List active zones |
| ''firewall-cmd --get-zones'' | List all zones |
| ''firewall-cmd --list-all-zones'' | List all in all zones (active or not) |
| ''firewall-cmd --zone=${THEZONE} --add-service=${THESERVICE}'' | Allow ''${THESERVICE}'' to ''${THEZONE}''|
| ''firewall-cmd --zone=${THEZONE} --remove-service=${THESERVICE}'' | Disallow ''${THESERVICE}'' from ''${THEZONE}''|
====== systemd/systemctl ======
systemd is the devil and systemctl is the whip to punish bofher's...
General:
^ ############## ** command ** ############## ^ ------------------------------------------------------------------ ^
| ''systemctl list-units'' | List units |
| ''systemctl list-units --all'' | List all units |
| ''systemctl list-units --type=service'' | List services |
| ''systemctl list-units --type=socket'' | List sockets |
| ''systemctl list-units --status=failed'' | List failed units |
In userspace:
^ ############## ** command ** ############## ^ ------------------------------------------------------------------ ^
| ''systemctl --user'' | List user-space units |
| ''systemctl --user -t target'' | List target state, see ''man systemd.target'' |
| ''systemctl --user list-dependencies default.target'' | List dependencies of any target, in this case ''default.target'' |
====== mail ======
Wonderful documentation [[http://www.johnkerl.org/doc/mail-how-to.html|here]]
^ ############## **MOVING AROUND** ############## ^ ------------------------------------------------------------------ ^
|''+''| next mail |
|''-''| prev mail |
|''''| go to '''' message in the index |
|''$'' | go to last message |
|''^'' | To the first undeleted message |
|''p''| print currrent mail |
|''h'' | list all mails |
|''d '' | delete current mail or ''n-m'' range of emails |
|''u'' | undo deletion |
|''q'' | quit |
|''r'' | reply a message |
|''s'' | save message to a file |
|''='' | print current message index number |
|''^'' | To the first non-whitespace character of a line. |
|''v'' | put current mail into ''vi'' |
\\
To see composing commands, read the link above...\\
\\
====== vim ======
^ ############## **MOVING AROUND** ############## ^ ------------------------------------------------------------------ ^
|''h,j,k,l''| left,down,up,right |
|''0'' | Begin of line |
|''$'' | End of line |
|''e'' | end of a word |
|''E'' | end of a whitespace-delimited word. |
|''b'' | beginning of a word. |
|''B'' | beginning of a whitespace-delimited word. |
|''0'' | beginning of a line. |
|''^'' | To the first non-whitespace character of a line. |
|''$'' | EOL |
|''H'' | 1st line of the screen (NOT of the document). |
|''M'' | middle line of the screen. |
|''L'' | Last line of the screen. |
|'':n'' | Go to line //n// |
|''p'' | Paste yanked text |
|''P'' | Paste yanked text BEFORE cursor |
|'' '' | bla |
|'' '' | bla |
^ ##############'''SPELL/SYNTAX'''############## ^ ------------------------------------------------------------------ ^
|''set spell'' | Enables orthographical correction |
|''set spelllang=#'' | Changes the orthographical dictionary |
|''z='' | language suggestions |
|''syntax on'' | Enables syntax check |
^ ##############'''SPLIT/TABS/BUFFERS'''############## ^ ------------------------------------------------------------------ ^
|'':split file'' | Horizontal split |
|'':vplit file'' | Vertical Split |
|''Crtl+w h,j,k,l'' | Focus change (like screen crtl->w->hjkl) |
|''Crtl+w w'' | Focus rotation |
|''Crtl+w r,R'' | Document (position) rotation |
|''Crtl+w Crtl+w'' | Switch buffer |
|'':bd'' | close buffer |
|''Crtl+w n'' | New buffer |
|'':new /etc/hosts '' | open /etc/hosts in region |
|''N Crtl+w +'' | Resize region N lines bigger |
|''N Crtl+w -'' | Resize region N lines smaller |
^ ##############'''VISUAL'''############## ^ ------------------------------------------------------------------ ^
| ''v'' | Modo Visual |
| ''V'' | Modo Visual y selecciona la linea actual |
| ''h,j,k,l'' | left,down,up,right selecting lines |
| ''<'' or ''>'' | TAB or UNTAB [multiple] lines |
| ''y'' | yank (copy) selected |
^ ##############'''MULTIPLE FILES'''############## ^ ------------------------------------------------------------------ ^
| ''vim file1 file2 file3'' | Open files: ''file1 file2 file3'' |
| '':n'' | Next file |
| '':N'' | Previous file |
| '':rev'' | Go to First file |
^ ##############'''PROGRAMMING'''############## ^ ------------------------------------------------------------------ ^
| ''Ctrl+a'' | In normal mode, with the curson on a number: increment by 1 that number |
| ''Ctrl+x'' | In normal mode, with the curson on a number: decrement by 1 that number |
| '':set foldmethod=syntax'' | enable folding |
| ''za'' | toggle folding a function or watever configured |
| ''zf'' | fold lines from the cursor downwards (with foldmethod=manual) |
| select lines with VISUAL ''zf'' | fold the selected lines |
^ ##############'''OTHERS'''############## ^ ------------------------------------------------------------------ ^
|'':%s/OLDSTRING/NEWSTRING[/g]'' | Substitution |
|'':set number'' | show line number |
|'':set nonumber'' | Hide line number |
|''Crtl+V'' -> select lines -> ''I'' Insert '''#''' -> '''ESC''' | Comment multiple lines at the same time|
| ''0''->''Crtl+V'' -> select lines -> ''x'' | Un-Comment multiple lines at the same time|
| ''Crtl+s'' | stop/pause input (very anonying)|
| ''Crtl+q'' | continue entering commands/text (input)|
====== tmux ======
* **Configuration**
In this case, I choose to setup TMUX with the CTRL+A combo like screen:
set -g history-limit 10000
setw -g mode-keys vi
# MAJOR ops
set-option -g prefix C-a
unbind C-b
bind-key C-a last-window
# Set status bar
set -g status-left-length 30
set -g status-bg black
set -g status-fg white
set -g status-left "#[fg=green]#H"
set -g status-right "#[fg=yellow]#(uptime | awk -F\: '{print $5}')"
setw -g monitor-activity on
set -g visual-activity on
* **the cheatsheet**
^ ##############'''CONNECTION'''############## | From outside tmux |
|''tmux'' | launch a new tmux |
|''tmux -L NAME'' | launch a new tmux with socket name "NAME" |
|''tmux ls '' | list tmux sessions |
|''tmux attach -t X'' | attach to tmux session X |
^ ##############'''INSIDE tmux'''############## ^ ------------------------------------------------------------------ ^
|''CTRL-a c'' | New tmux "tab"/session |
|''CTRL-a n'' | Next "tab" |
|''CTRL-a p'' | Prev "tab" |
|''CTRL-a N'' | Go to tab N |
| ''exit'' | exit current tab |
| ''CRTL-d'' | exit current tab |
|''CTRL-a ,'' | Change Current tab name |
| ''CRTL-a d'' | de-attach tmux |
|''CTRL-a &'' | Destroy (literally) current tab |
|''CTRL-a D'' | Choose a client to detach |
|''CTRL-a D'' | Choose a client to detach |
|''CTRL-a , '' | rename buffer |
^ ##############'''SPLITTING'''############## ^ ------------------------------------------------------------------ ^
|''CTRL-a "'' | Split current tab horizontally |
|''CTRL-a %'' | Split current tab vertically |
|''CTRL-a '' | Move through the regions |
|''CTRL-a CTRL-'' | Resize current region |
|''CTRL-a META-'' | Resize current region in steps of 5chars |
|''CTRL-a x'' | Close current region |
|''CTRL-a CTRL-o'' | Cycle panes forward |
|''CTRL-a META-o'' | Cycle panes backward |
|''CTRL-a !'' | Break the current pane out of the window. |
|''CTRL-a q'' | show pane index (cool) |
|''CTRL-a space'' | change split layout (vertical<->horizontal) |
^ ##############'''COPY/PASTE'''############## ^ ------------------------------------------------------------------ ^
|''CTRL-a ['' | Enter copy mode |
|''CTRL-a RePag'' | Enter copy mode and goback 1page |
|'''' | Begin selection (use arrows to move) |
|'''' | Finish selection and copy |
|''CTRL-a ]'' | Paste most recent buffer |
|''CTRL-a ='' | Select Paste Buffer and paste it |
|''q'' or ''CTRL-c'' | exit copy mode |
^ ##############'''SCROLL'''############## ^ ------------------------------------------------------------------ ^
|''CTRL-a ['' | Enter copy mode |
|''AvPag'' | Advance 1 page |
|''RePag'' | Previous page |
|''Inicio'' | Go to the 1st line of scroll |
|''Fin'' | Go to the last line of scroll (actual one) |
|''CRTL+r '' | Enter Search mode (begin writing), then ''CRTL+r'' to go to the previous ressult |
|''/'' | Enter VIM-like search |
|''q'' or ''CTRL-c'' | exit copy mode |
* **Other**
Sync panes (send input to all panes):
CTRL-a :
and:
setw synchronize-panes on
====== screen ======
^ ##############'''CONNECTION'''############## | From outside screen |
|''screen'' | launch a new screen |
|''screen -S NAME'' | launch a new screen with name "NAME" |
|''screen -m PROGRAM'' | launch a screen and inside it the "PROGRAM" |
|''screen -d -m PROGRAM'' | launch a DE-ATTACHED screen and run "PROGRAM" inside |
|''screen -ls '' | launch a new screen |
|''screen -x'' | bruteforce attach |
|''screen -r SCREENAME'' | attach to screen "SCREENAME" |
^ ##############'''INSIDE SCREEN'''############## ^ ------------------------------------------------------------------ ^
|''CTRL-a c'' | New screen "tab"/session |
|''CTRL-a n'' | Next "tab" |
|''CTRL-a p'' | Prev "tab" |
|''CTRL-a N'' | Go to tab N |
|''CTRL-a "'' | Tab list |
| ''exit'' | exit current tab |
| ''CRTL-d'' | exit current tab |
|''CTRL-a A'' | Change Current tab name |
| ''CRTL-a d'' | de-attach screen |
| ''CRTL-a C'' | clear current tab screen |
| ''CRTL-a l'' | reset current tab screen |
|''CTRL-a K'' | Destroy (literally) current tab |
^ ##############'''SPLITTING'''############## ^ ------------------------------------------------------------------ ^
|''CTRL-a S'' | Split current tab horizontally |
|''CTRL-a |'' | Split current tab vertically |
|''CTRL-a '' | Switch to next region |
|''CTRL-a X'' | Close current region |
^ ##############'''COPY/PASTE'''############## ^ ------------------------------------------------------------------ ^
|''CTRL-a '' | Enter copy mode |
|'''' | Begin selection (use arrows to move) |
|'''' | Finish selection and copy |
|''CTRL-a ]'' | Paste |
|''CTRL-a >'' | Write clipboard to file ''/tmp/screen-exchange'' |
|''CTRL-a <'' | Read ''/tmp/screen-exchange'' to clipboard |
|''CTRL-a ='' | Remove ''/tmp/screen-exchange'' but no clipboard content|
^ ##############'''SCROLL'''############## ^ ------------------------------------------------------------------ ^
|''CTRL-a '' | Enter copy mode |
|''AvPag'' | Advance 1 page |
|''RePag'' | Previous page |
|''Inicio'' | Go to the 1st line of scroll |
|''Fin'' | Go to the last line of scroll (actual one) |
|''CRTL+r '' | Enter Search mode (begin writing), then ''CRTL+r'' to go to the previous ressult |
|''/'' | Enter VIM-like search |
====== finch ======
^ ##############'''main'''############## ^ ------------------------------------------------------------------ ^
| ''ALT+a'' | List of avalaible actions |
| ''ALT+n'' | Next window |
| ''ALT+p'' | Prev window |
| ''ALT+w'' | window list |
| ''ALT+c'' | Close window |
| ''ALT+q'' | Quit |
| ''ALT+m'' | Move window |
| ''ALT+r'' | Resize window |
| ''ALT+s'' | window list |
| ''ALT+d'' | Dump the contents of the screen in HTML format in a file named "dump.html" in working directory. |
| ''ALT+.'' | Move the position of the current window in the window list one place to the right. |
| ''ALT+,'' | Move the position of the current window in the window list one place to the left. |
| ''ALT+l'' | Refresh the windows. This is useful after resizing the terminal window. |
| ''ALT+1..0'' | Jump to the 1st, 2nd ... 10th window. |
| ''CRTL+o'' | Bring up the menu (if there is one) for a window. Note that currently only the buddylist has a menu. |
| ''ALT+>'' | Switch to the next workspace |
| ''ALT+<'' | Switch to the previous workspace |
| ''AvPag RePag'' | Scroll text page up/page down |
| ''ALT+'' | BLA |
* Add buddy
* In the buddy list, select group and press ''F11''
* Move buddy/contact to group
* In the buddy list, select buddy/contact, press ''t'' to tag it, then select group and press ''a'' to add.
====== rtorrent ======
^ ##############'''INSIDE rtorrent'''############## ^ ------------------------------------------------------------------ ^
|''ENTER'' | Load torrent menu |
|''CTRL+s'' | Start downloading torrent |
|''CTRL+d'' | Stop downloading torrent |
|''CTRL+d + CTRL+d'' | Stop & remove downloading torrent |
|''CTRL+k'' | Close torrent |
|''CTRL+r'' | re-hash torrent |
|''CTRL+o'' | Change torrent download dir, torent must be closed |
|''CTRL+q'' | Quit |
|''l'' | view log (exit with space) |
|''a-s-d, z-x-c'' | (on main window) Download speed throttle |
|''A-S-D, Z-X-C '' | (on main window) Upload speed throttle |
|''+'' | Over a torrent: higher priority |
|''-'' | Over a torrent: lower priority |
====== DEPRECATED/OBSOLETE ======
===== vimperator =====
^ ##############'''SCROLL'''############## ^ ------------------------------------------------------------------ ^
| ''h,j,k,l'' | left,down,up,right |
| ''Control+u'' | half page up |
| ''Control+d'' | half page down |
| ''gg'' | Top of page |
| ''G'' | End of page |
^ ##############'''TABS'''############## ^ ------------------------------------------------------------------ ^
| ''crtl+n'' | next tab |
| ''crtl+p'' | prev tab |
| ''o -> :open URL'' | Open URL on the current tab |
| ''t -> :tabopen URL'' | Open URL on new tab |
| ''w -> :winopen URL'' | Open URL on new window |
| ''crtl+6'' | Previously selected tab |
| '':tabmove N'' | Move current tab to position N (0=First) |
^ ##############'''NAVIGATION'''############## ^ ------------------------------------------------------------------ ^
| ''f'' | follow hint (write to complete)|
| ''F'' | follow hint on new tab |
| ''/'' | search on current page |
^ ##############'''OTHERS'''############## ^ ------------------------------------------------------------------ ^
| '':set go+=mTB'' | Show the "common" firefox toolbar |
| '':set go-=mTB'' | Hide the "common" firefox toolbar |
===== Claws-mail =====
==== Main Window ====
| ''Ctrl+p'' | Print... |
| ''Ctrl+w'' | Work offline |
| ''Ctrl+Shift+s'' | Synchronise folders |
| ''Ctrl+s'' | Save as... |
| ''Ctrl+q'' | Exit |
| ''Ctrl+c'' | Copy |
| ''Ctrl+a'' | Select all |
| ''Ctrl+f'' | Find in current message... |
| ''Shift+Ctrl+f'' | Search folder... |
| ''Ctrl+t'' | Toggle threaded display |
| ''n'' | Go to next mail in Message List. The '''Down''' arrow does the same. |
| ''p'' | Go to previous mail. The '''Up''' arrow is a synonym. |
| ''Shift+n'' | Go to next unread mail. |
| ''Shift+p'' | Go to previous unread mail. |
| ''g'' | Go to other folder... |
| ''Ctrl+u'' | Show message source |
| ''Ctrl+h'' | Show all message headers |
| ''v'' | Toggles the message view panel visibility. When invisible, Message List expands itself to fill the full window height and more summary lines are displayed. |
| ''/'' | Positions the cursor on the Quicksearch field, also opening the Quicksearch panel if needed. |
| ''Ctrl+Alt+u'' | Update summary |
| ''Ctrl+i'' | Get mail from current account |
| ''Shift+Ctrl+i'' | Get mail from all accounts |
| ''Ctrl+m'' | Compose a new message |
| ''Ctrl+r'' | Reply |
| ''Shift+Ctrl+r'' | Reply to all |
| ''Ctrl+l'' | Reply to mailing list |
| ''Ctrl+Alt+f'' | Forward message |
| ''Ctrl+o'' | Move... |
| ''Shift+Ctrl+o'' | Copy... |
| ''Ctrl+d'' | Move to trash |
| ''Shift+d'' | Empty all Trash folders |
| ''Shift+*'' | Mark message |
| ''u'' | Unmark message |
| ''Shift+!'' | Mark message as unread |
| ''Shift+Ctrl+a'' | Open address book |
| ''x'' | Execute |
| ''Shift+Ctrl+l'' | Open log window |
==== Compose Window ====
| ''Ctrl+Return'' | Send |
| ''Shift+Ctrl+s'' | Send later |
| ''Ctrl+m'' | Attach file |
| ''Ctrl+i'' | Insert file |
| ''Ctrl+g'' | Insert signature |
| ''Ctrl+s'' | Save |
| ''Ctrl+w'' | Close |
| ''Ctrl+z'' | Undo |
| ''Ctrl+y'' | Redo |
| ''Ctrl+x'' | Cut |
| ''Ctrl+c'' | Copy |
| ''Ctrl+v'' | Paste |
| ''Ctrl+a'' | Select all |
| ''Ctrl+b'' | Move a character backward |
| ''Ctrl+f'' | Move a character forward |
| ''Ctrl+e'' | Move to end of line |
| ''Ctrl+p'' | Move a previous line |
| ''Ctrl+n'' | Move a next line |
| ''Ctrl+h'' | Delete a character backward |
| ''Ctrl+d'' | Delete a character forward |
| ''Ctrl+u'' | Delete line |
| ''Ctrl+k'' | Delete to end of line |
| ''Ctrl+l'' | Wrap current paragraph |
| ''Ctrl+Alt+l'' | Wrap all long lines |
| ''Shift+Ctrl+l'' | Toggle auto wrapping |
| ''Shift+Ctrl+x'' | Edit with external editor |
| ''Shift+Ctrl+a'' | Open address book |
===== dwb =====
^ ##############'''SCROLL'''############## ^ ------------------------------------------------------------------ ^
| ''h,j,k,l'' | left,down,up,right |
| ''Control+u'' | half page up |
| ''Control+d'' | half page down |
| ''gg'' | Top of page |
| ''G'' | End of page |
^ ##############'''TABS'''############## ^ ------------------------------------------------------------------ ^
| ''J'' | next tab |
| ''K'' | prev tab |
| ''o'', '':open'' + URL | Open URL on the current tab |
| ''O'', '':tabopen'' + URL | Open URL on new tab |
| ''w -> :winopen URL'' | Open URL on new window |
| ''go'' | Open CURRENT URL on current tab |
| ''gO'' | Open CURRENT URL on new tab |
| ''o'' | Open CURRENT URL on current tab |
| ''gO'' | Open CURRENT URL on new tab |
| ''xo'' | New background tab |
| ''xO'' | Open CURRENT URL on new background tab |
| ''crtl+tab'' | Previously selected tab |
| ''nT'' | Go to tab ''n'' |
| ''[n]gm'' | Move current tab to position ''n'' or 1st position if not ''n'' |
| ''[n]gl'' | Move current tab ''n'' positions left |
| ''[n]gr'' | Move current tab ''n'' positions right |
^ ##############'''NAVIGATION'''############## ^ ------------------------------------------------------------------ ^
| ''f'' | follow hint (write to complete)|
| ''F'' | follow hint on new tab |
| ''/'' | search on current page |
| ''H'' | History back |
| ''L'' | History forward |
^ ##############'''OTHERS'''############## ^ ------------------------------------------------------------------ ^
| '':set go+=mTB'' | Show the "common" firefox toolbar |
| '':set go-=mTB'' | Hide the "common" firefox toolbar |
====== Links ======
* [[http://www.math.ucdavis.edu/~mathclub/cheat_sheets/vim-cheatsheet.png|VIM Cheatsheet]] (png)
* [[http://www.tuxfiles.org/linuxhelp/vimcheat.html|vim cheat]]