Check These Out
Depending on the speed of you system, amount of RAM, and amount of free disk space, you can find out practically how fast your disks really are. When it completes, take the number of MB copied, and divide by the line showing the "real" number of seconds. In the sample output, the cached value shows a write speed of 178MB/s, which is unrealistic, while the calculated value using the output and the number of seconds shows it to be more like 35MB/s, which is feasible.
Saves one character, the original is probably clearer
This shell function takes a single argument, which is used as the base name of the .wav, .timing and .session files created. To create a screencast:
$ screencast test
type and talk ...
then type 'exit' or to exit the screencast.
test.wav will contain the audio from your screencast.
test.session will contain text and control characters needed to paint the screen
test.timing will contain timing information needed to synch individual keystrokes in test.session with the audio.
to play back:
$ aplay test.wav & scriptreplay test.{timing,session}
NOTE: because the shell function uses the variable "$!", and bash likes to expand '!' during history expansion, you will need to turn off bash's history before you enter the shell function.
This can be achieved using the command
$set +H
Replace 'csv_file.csv' with your filename.
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
This allows to switch from horizontal to vertical split, putting the current buffer on the right side of the vertical split. To put it on the right use ^W-H.
In a similar way, to switch from Vertical to Horizontal, do ^W-J (for bottom) and ^W-K (for top), but you vimers all guessed that one already :P
"seq 100" outputs 1,2,..,100, separated by newlines. awk adds them up and displays the sum.
"seq 1 2 11" outputs 1,3,..,11.
Variations:
1+3+...+(2n-1) = n^2
$ seq 1 2 19 | awk '{sum+=$1} END {print sum}' # displays 100
1/2 + 1/4 + ... = 1
$ seq 10 | awk '{sum+=1/(2**$1)} END {print sum}' # displays 0.999023
List the full path of some files.
You can add ".*" on the end if you want to display hidden files.
for when a program is hogging the sound output. finds, and kills. add -9 to the end for wedged processes. add in 'grep ^program' after lsof to filter.