Check These Out
Finds all symbolic links in the specified directory which match the specified string pattern.
I used this when upgrading from an Apple-supported version of Java 6 (1.6.0_65) to an Oracle-supported version (1.7.0_55) on Mac OS X 10.8.5 to find out which executables were pointing to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands (Apple version) vs. /Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home/bin (Oracle version). However, it appears the current JDK installation script already takes care of modifying the links.
added alias in ~/.bashrc
alias lf='find ./* -ctime -1 | xargs ls -ltr --color'
Here's a version that uses perl. If you'd like a trailing newline:
$ perl -pe 's/(.)/sprintf("\\x%x", ord($1))/eg; END {print "\n"}'
Use flag "--" to stop switch parsing
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
Sometimes things break. You can find the most recent errors using a combination of journalctl, along with the classic tools sort and uniq
ffmpeg
-i = input file name
-s = set frame size, qcif=176x144
-vcodec = force video codec
-r = frame-rate [default = 25]
-b = bit-rate [200 kb/s]
-acodec = force audio codec
-ab = audio bitrate in bits/s [64k]
-ac = no. of audio channels [1]
-ar = audio sampling frequency [44100 Hz]
optional:
-sameq = use same video quality as source (implies VBR)
-f = force format
-y = overwrite output files