Check These Out
Useful when you want to know the mbrid of a device - for the purpose of making it bootable. Certain hybridiso distros, for eg the OpenSUSE live ISO uses the mbrid to find the live media. Use this command to find out the mbrid of your USB drive and then edit the /grub/mbrid file to match it.
Installs pip packages defining a proxy
resume a partial scp-filetransfer with rsync
Handy for those times you need to paste a file path in an IDE or some other app.
sudo apt-get install xclip
Then, for convenience, alias xclip to 'xclip -selection c' so you can just do something like realpath . | xclip
By default, screen tries to restore its old window sizes when attaching to resizable terminals. This command is the command-line equivalent to typing ^A F to fit an open screen session to the window.
Using this command you can track a moment when usb device was attached.
Requires:
curl
xsel
access to the internet(http://transfer.sh)
This is an alias utilizing the transfer.sh service to make sharing files easier from the command line. I have modified the alias provided by transfer.sh to use xsel to copy the resulting URL to the clipboard.
The full modified alias is as follows since commandlinefu only allows 255 characters:
transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" |xsel --clipboard; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" |xsel --clipboard ; fi; xsel --clipboard; }
You can set the previous bash command as the terminal title by this command.
Explanation:
-trap assigns a command to execute at a given bash signal.
-in the $BASH_COMMAND you find the last command
-you can set the terminal title with the escape sequence: \e]0;this is the title\007
-to let the echo care about the backslashes give the -e to it
Since trap is a built in bash command you find more informatin in 'man bash'for more
Source: http://www.davidpashley.com/articles/xterm-titles-with-bash.html
displays current time in "binary clock" format
(loosely) inspired by: http://www.thinkgeek.com/homeoffice/lights/59e0/
"Decoding":
8421
.... - 1st hour digit: 0
*..* - 2nd hour digit: 9 (8+1)
.*.. - 1st minutes digit: 4
*..* - 2nd minutes digit: 9 (8+1)
Prompt-command version:
PROMPT_COMMAND='echo "10 i 2 o $(date +"%H%M"|cut -b 1,2,3,4 --output-delimiter=" ") f"|dc|tac|xargs printf "%04d\n"|tr "01" ".*"'