1. This hack ensures that when you log on to a server/pc it will execute a screen session which minimizes the risks of you losing your work in case of network disruptions . Just copy command to your bashrc file and source it.
#Best used when you have to work on a different server via ssh.

[sourcecode language="bash"]if [ "$TERM" != "screen" ]; then screen -xRR fi[/sourcecode] 2. This hack enables mouse scrolling and scrollbar history scrolling. Just copy command to your ~/.screenrc file and restart your shell. [sourcecode language="bash"] # Enable mouse scrolling and scroll bar history scrolling defscrollback 5000 termcapinfo xterm* ti@:te@ [/sourcecode] 3. Ever gotten to a point where, you can't remember a certain command you executed and when you try to grep it from history it suddenly disappeared well, this hack fixes that. Copy and paste following codes to ~/.bashrc and source it. It creates a file named 'command_log' and logs all executed commands as well as timestamp. Nifty!! very Nifty [sourcecode language="bash"] # log every command typed and when if [ -n "${BASH_VERSION}" ]; then
trap "caller >/dev/null || \
printf '%s\\n' \"\$(date '+%Y-%m-%dT%H:%M:%S%z')\ \$(tty) \\${BASH_COMMAND}\" 2>/dev/null >>~/.command_log" DEBUG
fi
[/sourcecode]