Check These Out
I always add this to my .profile rc so I can do things like: "vim *.c" and the files are opened in tabs.
Stuck behind a restrictive firewall at work, but really jonesing to putty home to your linux box for some colossal cave? Goodness knows I was...but the firewall at work blocked all outbound connections except for ports 80 and 443. (Those were wide open for outbound connections.) So now I putty over port 443 and have my linux box redirect it to port 22 (the SSH port) before it routes it internally. So, my specific command would be:
$iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 22
Note that I use -A to append this command to the end of the chain. You could replace that with -I to insert it at the beginning (or at a specific rulenum).
My linux box is running slackware, with a kernel from circa 2001. Hopefully the mechanics of iptables haven't changed since then. The command is untested under any other distros or less outdated kernels.
Of course, the command should be easy enough to adapt to whatever service on your linux box you're trying to reach by changing the numbers (and possibly changing tcp to udp, or whatever). Between putty and psftp, however, I'm good to go for hours of time-killing.
################################################################################
# get all modified files since last commit and zip them to upload to live server
################################################################################
# delete previous tar output file
rm mytarfile.tar -rf
#rm c:/tarOutput/*.* -rf
# get last commit id and store in variable
declare RESULT=$(git log --format="%H" | head -n1)
# generate file list and export to tar file
git diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT $RESULT | xargs tar -rf mytarfile.tar
# extract tar files to specified location
tar -xf mytarfile.tar -C c:/tarOutput
just for fun
Explanation
Firstly the function checks if user gave it any input, and notifies the user if they failed to do so.
If user has inputed a search string, the function will call upon youtube-dl to find url of the audio of the first matching youtube video and play that with mpv.
Call function by wrapping search string in quotes:
listen-to-yt "sultans of swing"
You have to paste the line in your .zshrc and source .zshrc for it to work.
Limitations
The dependancies are youtube-dl and mpv.
this oneliner is stolen from http://www.bashoneliners.com/oneliners/302/
Based on capsule8 agent examples, not rigorously tested
Shows all block devices in a tree with descruptions of what they are.
this is good for variables if you have many script created files and if you want to know which one is the last created/changed one..