Keep SSH session alive [closed]

The ssh daemon (sshd), which runs server-side, closes the connection from the server-side if the client goes silent (i.e., does not send information). To prevent connection loss, instruct the ssh client to send a sign-of-life signal to the server once in a while. The configuration for this is in the file $HOME/.ssh/config, create the file … Read more

List of ANSI color escape sequences

The ANSI escape sequences you’re looking for are the Select Graphic Rendition subset. All of these have the form \033[XXXm where XXX is a series of semicolon-separated parameters. To say, make text red, bold, and underlined (we’ll discuss many other options below) in C you might write: printf(“\033[31;1;4mHello\033[0m”); In C++ you’d use std::cout<<“\033[31;1;4mHello\033[0m”; In Python3 … Read more

Concatenate multiple files but include filename as section headers

Was looking for the same thing, and found this to suggest: tail -n +1 file1.txt file2.txt file3.txt Output: ==> file1.txt <== <contents of file1.txt> ==> file2.txt <== <contents of file2.txt> ==> file3.txt <== <contents of file3.txt> If there is only a single file then the header will not be printed. If using GNU utils, you … Read more

OS X Terminal Colors [closed]

Here is a solution I’ve found to enable the global terminal colors. Edit your .bash_profile (since OS X 10.8) — or (for 10.7 and earlier): .profile or .bashrc or /etc/profile (depending on availability) — in your home directory and add following code: export CLICOLOR=1 export LSCOLORS=GxFxCxDxBxegedabagaced CLICOLOR=1 simply enables coloring of your terminal. LSCOLORS=… specifies … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)