Check These Out
You may go to Internet by means of your home ssh server. You must configure your local proxy to send traffic through the proxy. Many programs allows that: firefox, pidgin, skype, gnome, etc.
Your home ssh server must listen in any of the ports permitted by your enterprise firewall. That usually includes 80 and 443.
The command cechks if we are connected to a X11 console, if the $TERM var noct yet contains a "screen" derivat, and only then attachs to tmux.
You could add a test for interactive shell [[ $- == *i* ]] but your .bashrc has that already, I bet.
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video).
$ cat /proc/acpi/video/VGA/LCD/brightness
to discover the possible values for your display.
Use Ruby's standard Curses module to display a Lissajous curve in the console. Replace the "0.2" with different numbers for different curves.
Please note that binary file checking is NOT perfect.
So, use it with caution.
It does not delete hidden files whose name has a leading '.' character.
And it regards an empty file as a binary file.
This command converts filenames with embedded spaces in the current directory replacing spaces with the underscore ("_") character.
seq -s ' ' 1 9 | sed -n ':a;p;s/ *\w$//;h;/^$/t;b a;q' | tac | awk '{for(i=1;i
Unlike other methods that use pipes and exec software like tr or sed or subshells, this is an extremely fast way to print a line and will always be able to detect the terminal width or else defaults to 80. It uses bash builtins for printf and echo and works with printf that supports the non-POSIX `-v` option to store result to var instead of printing to stdout.
Here it is in a function that lets you change the line character to use and the length with args, it also supports color escape sequences with the echo -e option.
$ function L() { local l=; builtin printf -vl "%${2:-${COLUMNS:-`tput cols 2>&-||echo 80`}}s\n" && echo -e "${l// /${1:-=}}"; }
With color:
$ L "`tput setaf 3`="
1. Use printf to store n space chars followed by a newline to an environment variable "l" where n is local environment variable from $COLUMNS if set, else it will use `tput cols` and if that fails it will default to 80.
2. If printf succeeds then echo `$l` that contains the chars, replacing all blank spaces with "-" (can be changed to anything you want).
From: http://www.askapache.com/linux/bash_profile-functions-advanced-shell.html http://www.askapache.com/linux/bash-power-prompt.html