Homebrew
Installing open source apps & libraries in Terminal
True open source stylin': a tool chest of programs which do a single thing very well that you chain together to do more advanced things.
Links:
- Homebrew website
- Homebrew Demystified: OS X's Ultimate Package Manager
- What are the first or must-have Homebrew packages that you install on your Mac?
A few packages to install & play with:
-
cowsay - try it. nuff said
# say something cowsay "hello world" # think something cowthink "what is she wearing??!" # a wired cow cowsay -w "dude, finals are TOMORROW" # using a cowfile cowsay -f vader "Luke, I am your father." # cowsay inception echo "get me out of here" | cowsay -n | cowsay -nd | cowsay -np
-
cmatrix - Matrix up in your Terminal
cmatrix
-
wget - download anything (similar to curl)
wget http://something/you/want/on/your/computer.jpg
-
youtube-dl - download media from youtube and various other sharing sites
# list available video formats youtube-dl -F https://www.youtube.com/watch?v=w6DW4i-mfbA # download medium-sized mp4 (format 18) youtube-dl -f 18 https://www.youtube.com/watch?v=w6DW4i-mfbA
-
imagemagick - encode/decode any image
# resize all jpgs in the current folder to 320 wide mogrify -resize 320 *.jpg # create an animated gif using all the jpgs in the current folder convert -delay 15 -loop 0 *.jpg douglas.gif
-
ffmpeg - encode/decode any video
# output png frames at 5 fps ffmpeg -i input.mp4 -r 5 frames%04d.png
-
sox - encode/decode any audio
# combine multiple files sox -m file1.wav file2.wav output.wav # copy part of a file into another file (start & duration in seconds) sox input.wav output.wav trim 90 120 # reverse a file sox input.wav output.wav reverse # just play a file in reverse sox input.wav reverse # change the sample rate of a file sox input.wav -r 22050 output.wav # change the speed of a file (speed as a multiplier where 1.0 is normal speed) sox input.wav output.wav speed 3.0 # extract the left channel of a stereo file into a separate file (l - left, r - right, etc) sox stereo.wav -c 1 mono.wav avg -l
-
lynx - text-mode web browser
lynx class.danomatika.com
-
pandoc - convert Markdown to html, epub, pdf, etc
# convert Markdown to a standalone HTML file pandoc -s README.md -o example.html
-
calc - interactive calculator
# start calc calc # interest calculation: I (interest) = P (principal) * r (interest rate) * n (number of periods) # calculate the interest for 1 month of a $20k loan at 6% ; P = 20000 ; r = 0.06 ; n = 12 ; I = P * r * n ; I ; exit