This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//source: http://unix.stackexchange.com/questions/93139/can-i-zip-an-entire-folder-using-gzip | |
//In order to "zip" a directory, the correct command would be | |
tar -zcvf archive.tar.gz directory/ | |
//This will tell tar to c (create) an archive from the files in directory (tar is recursive by default), | |
//compress it using the z (gzip) algorithm, store the output as a f (file) named archive.tar.gz, | |
//and v (verbosely) list all the files it adds to the archive. | |
//To decompress and unpack the archive into the current directory you would use | |
tar -zxvf archive.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//get the ip address | |
ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//source: https://stackoverflow.com/questions/25031557/rotate-mp4-videos-without-re-encoding/27768317#27768317?newreg=6ed56ec178f84481a73a2072665bb8c6 | |
ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=90 output.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//tar.gz | |
//source: http://unix.stackexchange.com/questions/93139/can-i-zip-an-entire-folder-using-gzip | |
//This will tell tar to c (create) an archive from the files in directory (tar is recursive by default), | |
//compress it using the z (gzip) algorithm, store the output as a f (file) named archive.tar.gz, | |
//and v (verbosely) list all the files it adds to the archive. | |
//In order to "zip" a directory, the correct command would be | |
tar -zcvf archive.tar.gz directory/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clear out a log | |
USRLSML-2HLDV7L:logs uwhitbo$ echo "" > php_error.log | |
RESULT: | |
-rw-r--r-- 5 uwhitbo admin 1 Mar 2 13:08 php_error.log | |
// save folder listing | |
//source: https://github.com/0nn0/terminal-mac-cheatsheet/wiki/Terminal-Cheatsheet-for-Mac-%28-basics-%29 | |
ls -R > CURRENT_2015_2.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check for Python | |
python --version | |
# Check for node.js on Linux | |
nodejs --version | |
# Check for node.js on Windows | |
node --version | |
//source: http://kripken.github.io/emscripten-site/docs/building_from_source/toolchain_what_is_needed.html#toolchain-test-which-dependencies-are-installed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SOURCE: | |
//http://stackoverflow.com/questions/7362130/getting-video-dimension-from-ffmpeg-i | |
ffmpeg -i 1_1_misconception1_adaptivepathway_redo3.mp4 2>&1 | perl -lane 'print $1 if /(\d+x\d+) \[/' | |
that outputs : 768x432 | |
//prints out the directory | |
for FILENM in *; do ffmpeg -i $FILENM 2>&1 | perl -lane 'print "\n",$1 if /(\d+x\d+) \[/'; printf $FILENM; done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///NEW (2020-12-23) | |
1. Create a new repo on github. Make sure to not create a readme, licence, or git ignore. New repo MUST BE EMPTY!!!! | |
2. If you added NOTHING you will see the "Quick Setup" screen. | |
3. In your local repo (the folder you want to create the project from) run these commands in order: | |
LG3-MBP:ADSR lg3$ git init | |
LG3-MBP:ADSR lg3$ git add . | |
LG3-MBP:ADSR lg3$ git commit -m "enter a comment. What are you committing" | |
LG3-MBP:ADSR lg3$ git branch -M main | |
-- REF: https://docs.github.com/en/free-pro-team@latest/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//BOIL IT ALL DOWN TO 2 LOOPS | |
//|==++--++==||==++--++==||==++--++==||==++--++==||==++--++==||==++--++==||==++--++==||==++--++==||==++--++==| | |
//Loop through all the files and pad them | |
for FILENM in *; do ffmpeg -i $FILENM -filter:v 'pad=max(iw\,ih*(16/9))+mod(max(iw\,ih*(16/9))\,2):ow/(16/9)+mod(ow/(16/9)\,2):(ow-iw)/2:(oh-ih)/2' -aspect 16:9 -s hd720 -acodec copy -vcodec libx264 -preset slow -crf 18 ${FILENM/.mp4/}_pad.mp4; done; | |
//loop through all the files and add the posterframe. NOTE: posterTitle.mp4 must be one directory level up from the files you are working on. | |
for FILENM in *; do ffmpeg -i ../posterTitle.mp4 -i $FILENM -filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" -vcodec h264 -pix_fmt yuv420p -an ${FILENM/.mp4/}_titled.mp4; done; | |
/////////////////////////////////// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//copy directory into another directory | |
cp -R CSV/ WPS_SITES/ab_middleton_law_mysearchlab_9/CSV/ | |
//mkdir | |
//--the -p flag will create the intermediate directories. | |
mkdir -p LM/STINKBUT/TEST | |
//show the size of the home directory |