Check These Out
change the nfl in the url to mlb or nba to get those score/times as well
One of the first functions programmers learn is how to print a line. This is my 100% bash builtin function to do it, which makes it as optimal as a function can be. The COLUMNS environment variable is also set by bash (including bash resetting its value when you resize your term) so its very efficient. I like pretty-output in my shells and have experimented with several ways to output a line the width of the screen using a minimal amount of code. This is like version 9,000 lol.
This function is what I use, though when using colors or other terminal features I create separate functions that call this one, since this is the lowest level type of function. It might be better named printl(), but since I use it so much it's more optimal to have the name contain less chars (both for my programming and for the internal workings).
If you do use terminal escapes this will reset to default.
$ tput sgr0
For implementation ideas, check my
http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html
This will take a screenshot of a selected area and save it as foo.png as well as sending it straight to the clipboard for pasting into GIMP, Anki, Zim, etc.
Convert all jpegs in the current directory into ~1024*768 pixels and ~ 150 KBytes jpegs
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
lists files and folders in a folder with summary.
The OPs solution will work, however on some systems (bsd), grep will not filter the data, unless the --line-buffered option is enabled.
When a fs hangs and you've just one console, even # ls could be a dangerous command. Simply put a trailing "&" and play safe
You might want to secure your AWS operations requiring to use a MFA token. But then to use API or tools, you need to pass credentials generated with a MFA token.
This commands asks you for the MFA code and retrieves these credentials using AWS Cli. To print the exports, you can use:
`awk '{ print "export AWS_ACCESS_KEY_ID=\"" $1 "\"\n" "export AWS_SECRET_ACCESS_KEY=\"" $2 "\"\n" "export AWS_SESSION_TOKEN=\"" $3 "\"" }'`
You must adapt the command line to include:
* $MFA_IDis ARN of the virtual MFA or serial number of the physical one
* TTL for the credentials