Re: tips and tricks for everything but emacs
Posted: Fri Apr 20, 2018 8:22 pm
Code: Select all
set
set tcp_svc {
type inet_service; flags interval;
elements = {
ssh, domain, 443,
netbios-ssn, microsoft-ds,
}
}
set udp_svc {
type inet_service; flags interval;
elements = {
domain,
60000-61000, #mosh
}
}
chain service_checks {
# accept established
ct state {established, related} counter accept
# drop invalid
ct state invalid counter drop
}
chain input {
.......
tcp dport @tcp_svc accept
udp dport @udp_svc accept
}
Code: Select all
set blocked_country4 {
type ipv4_addr; flags interval;
element = { insert_Jiangsu_or_China_address_range_here }
}
set blocked_country6 {
type ipv6_addr; flags interval;
element = { insert_vietcongs_address_range_here }
}
chain input {
....
ip saddr.@cblock_country4 counter packets 0 bytes 0 drop
}
Thank you so much. Very helpful :)pidsley wrote: ↑Tue Feb 17, 2015 4:16 amWe have a T&T for emacs, so let's have one for everything else. Post the things you use in nano, vim, tmux, even cmus, moc, and anything else you can think of. What shortcut keys or configs work for you?
I already posted about using nano buffers to load more than one file at once here: http://linuxbbq.org/bbs/viewtopic.php?f ... 132#p37123
The things I use in vim every day:And I use tmux all the time. I usually have two ratpoison windows open -- one for firefox, and the other for tmux. I use tmux like a CLI window manager. In tmux I usually have one multi-pane window for terminals, a second full window for weechat, and a third window for ssh to my nfs server. Assuming "P" means "prefix" (which I have defined as ctrl-A, but you may have as ctrl-B in a default tmux config, I use these sequences every day:Code: Select all
function! NuTriState() " toggle through line-number modes if(&rnu) " turn off line numbering set nonu set nornu elseif(&nu) " normal numbers on, add relative numbers (hybrid mode) set rnu else " normal numbers off, turn them on set nu endif endfunc nnoremap <silent><F2> :call NuTriState()<cr> " select lines in visual mode, ,ic adds # comments, ,rc removes map ,ic :s/^/#/g<CR>:let @/ = ""<CR> map ,rc :s/^#//g<CR>:let @/ = ""<CR>
Very basic.Code: Select all
P-z : toggle pane full screen P-! : split pane into a new window P-c : create new window P-<n> : goto window <n>
You have probably also seen my tmux.conf, where I redefine the window split commands to the function keys. Nothing fancy like gutterslob or DJ's configs, but it works for me.
What interesting keybinds or configs do you use?
(thamks dkeg and gekkop for encouraging me to start this thread)