VI Cheat Sheet

VI CHEAT SHEET

   ^        ESC: escape from edit
<- | | ->        to command mode
     ˇ
 H J K L

Insert:
i insert in place of cursor
a append after cursor
A append end of line
o new line below cursor
O new line above cursor
Delete:
x del single char on cursor
X del backwards a char (backspace)
3x del 3 chars forward
dw del word
3dw del 3 words
dd del current line
3dd del 3 lines (inc. current)
dG del up to start of file
d1G del down to end of file
"x2dd del 2 lines to name "x"
cc rewrite whole line
C rewrite to end of the line 
:r <file> inser file under current line
Move:
f forward a char
F backward a char
w next word
b start of word
e end of word
( back a sentence
) forward a sentence
% move to matching bracket
0 move to start of line
$ move to end of line
H move to start of screen
M move to middle of screen
L move to end of screen
G move to end of file
1G move to start of file
nG move to n.th line
:/pattern/d Find line cont. pattern & del 
Ctrl+g show line number
Ctrl+f scroll forward a page
Ctrl+b scroll backward a page
Search and replace:
/ search forward
? search backward
n go to next match
N go to prev. match
:s/from_pattern/to_string/g|c|&
 g:whole line, c:confirm, &:repeat last
:%s/from_pattern/to_string/ whole file
Yank:
y yank (copy)
Y yank (copy) line (or yy)
y$ yank to end of line
y0 yank to start of line
y/swordfish yank to word swordfish
yfg yank to char g
5,10y yank from line 5 to 10
"xy3w yank 3 words from cursor to name "x"
"xy3f yank 3 chars from cursor to name "x"
:/dog/,/cat/d Find line cont. "dog" and
 delete until line containing "cat"
:.,/foo/d Delete from current line to line
 containing "foo" 
p paste after cursor
P paste before cursor
"xp paste clipboard x after cursor
Misc:
u undo last change
U undo changes to line
J join lines
nJ join next n lines
. repeat last command
Commands:
:q quit (if there were no changes)
:q! quit without changes
:w save
:wq save and wuit
:set ic = ignore case
:set noic = case sensitive
:set nu set line numbers
:set nonu unset line numbers

linkek — NetCat

NetCat
_______________________________________________________________________
http://www.ol-service.com/sikurezza/doc/netcat_eng.pdf
http://blog.fsck.hu/index.php/tag/netcat/
http://www.sans.org/security-resources/sec560/netcat_cheat_sheet_v1.pdf
http://www.g-loaded.eu/2006/11/06/netcat-a-couple-of-useful-examples/
http://en.wikipedia.org/wiki/Netcat

linkek — How to connect to wireless AP via CLI

More or less the same:

http://blog.sudonetworks.com/2010/03/configuring-wpawpa2-on-linux-clients.html
http://ubuntuforums.org/showthread.php?t=202834&highlight=wpa+gutsy

..in a nutshell:
1.  wpa_passphrase <access_point_SSID>  =>  gives you the coded passphrase
2.  Copy the coded passphrase to /etc/wpa_supplicant/wpa_supplicant.conf, like this:
(config file can be anywhere, name can be anything)
network={
ssid=”<access_point_SSID>”
#psk=<output of    wpa_passphrase <access_point_SSID>>
psk=9ae7a5f631ecc688db8dcc6bbf317b4a551b39e9ee9c20effb5393e342bd954b
}
3.   Enable WLAN interface with    ifconfig <wlan_interface> up
+   You can search for available APs with    iwlist <wlan_interface> scanning | grep -i essid
4.  Configure the interface to use a specific SSID with   iwconfig <wlan_interface> essid <access_point_SSID>
5.  Start WPA authentication with    wpa_supplicant -i<interface> -c <config_file>
6.  Assign an IP with this interface or use DHCP (ddclient <interface>), set routing if necessary

You can now use your connection!

linkek — GMail in terminal

GMail in ALPine:
http://javatarian.wordpress.com/2008/02/01/configuring-alpine-with-gmail/
http://www.soton.ac.uk/~fangohr/randomnotes/email.html
http://lusule.wordpress.com/2008/08/16/how-to-7/
https://www.cs.virginia.edu/~csadmin/wiki/index.php/Setting_up_Pine_%28Alpine%29_for_IMAP_Gmail
http://mail.google.com/support/bin/answer.py?hl=en&answer=78799
———————
GMail in Mutt:
http://shreevatsa.wordpress.com/2007/07/31/using-gmail-with-mutt-the-minimal-way/
http://www.linux.com/archive/articles/48771
http://crunchbanglinux.org/wiki/howto/howto_setup_mutt_with_gmail_imap

linkek — mindmappers, timetracker, PDF reader, multimedia converter

Mindmaps
Compendium  —  http://compendium.open.ac.uk/institute/community/showcase.htm
Freemind  —  http://freemind.sourceforge.net/wiki/index.php/Main_Page

Lightweight time tracker  —  http://lwtt.aiken.cz/section/documentation

PDF reader  —  http://www.foxitsoftware.com/downloads/index.php

Hypervideo Converter  —  http://gtk-apps.org/content/show.php/Hyper+Video+Converter?content=88970

linkek — Google translate from command line

http://ubuntuforums.org/showthread.php?t=1087457

The link contains the script (php). I made there aliases in   .bashrc

alias trenhu=’translate en hu ‘

alias trhuen=’translate hu en ‘

alias trdehu=’translate de hu ‘

alias trhude=’translate hu de ‘

..and so forth