This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Programs: | |
iptables | |
ip6iptables | |
Type: | |
INPUT OUTPUT FORWARD | |
ACCEPT DROP REJECT | |
-s = Source IP | |
-d = Destination IP | |
-sport = Source Port |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Generally each command takes ~500ms, but with this, they will take ~10ms to execute. Add this into shell profile page | |
function tldr () { | |
mkdir -p /tmp/tldr_cache | |
if [ "--flush-cache" == $1 ]; then | |
rm /tmp/tldr_cache/* | |
return | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Move running process in background | |
A) Ctrl + Z (It suspends (like pause) process) | |
B) bg (Its keeps running in background) | |
Move new process in background | |
A) sleep 10 & (Print output to terminal whenever it comes) | |
A) nohup sleep 10 & (Saves output to a file nohup.out) | |
A) sleep 10> /dev/null & (output is lost) | |
Move background process to foreground |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |