This file contains hidden or 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
| for i in *.jpg; do echo "Processing $i"; exiftool -all= "$i"; done | |
| from: http://www.linux-magazine.com/Online/Blogs/Productivity-Sauce/Remove-EXIF-Metadata-from-Photos-with-exiftool |
This file contains hidden or 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
| Step 1: | |
| ffmpeg -r 1 -loop 1 -i blank_1920x1080.png -i input.wav -r 1 -shortest output.mp4 | |
| Step 2: | |
| Upload output.mp4 to youtube. Wait an hour or so for the automatic captions to generate | |
| Step 3: | |
| youtube-dl --write-sub --sub-lang en --skip-download ____Youtube URL from Previous Step____ | |
| Step 4: |
This file contains hidden or 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
| #Toss this in a directory of timelapse photos, make sure your files are ordered somehow | |
| #(I've been using unix timestamp for my files), and run it. It'll create a folder called | |
| #'equalized' and it will equalize exposure of all the images, and then it will it will | |
| #average the first 12 images to create output image 1, then it'll average images 2-13 | |
| #to create output image 2, and so on until all the images in the folder have been | |
| #averaged. You can change the number of images to average by changing #the average | |
| #variable. Do note, large numbers of images averaged will take _forever_. | |
| import os | |
| from os import path |
This file contains hidden or 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
| mkdir no-audio; for f in *.MP4; do ffmpeg -i "$f" -an -c:v copy no-audio/$f; done |
This file contains hidden or 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
| <pre><?php | |
| /* | |
| For generating spinning videos from spherical panos using pano2vr: | |
| https://www.youtube.com/watch?v=l_VrEJUUh64 | |
| Fill out the config below. | |
| Run the code, copy and paste the output into a file named "spin.p2vr" or similar. | |
| Make sure your input image is in the same location as your spin.p2vr file. | |
| Open the spin.p2vr file and then hit 'create all' at the bottom right. |
This file contains hidden or 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
| import os | |
| import re | |
| def get_face(img_name): | |
| #find your imagga curl user info on your account | |
| #saves face data as a json | |
| command = f"curl -s --user \"_________imagga-user-code__________\" -F \"image=@{img_name}\" \"https://api.imagga.com/v2/faces/detections\" > {img_name}.json" | |
| os.system(command) |
This file contains hidden or 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
| #!/bin/bash | |
| #to compress a folder: | |
| #for i in *;do ./compress.sh "$i";done | |
| new_file_name=$(sed 's/ /_/g' <<< "${1%.*}_c.jpg") | |
| cjpeg "$1" | jpegtran -o | exiftool - -all= > "$new_file_name" | |
| before_size=$(wc -c "$1" | awk '{print $1}') |
This file contains hidden or 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
| <?php | |
| /* | |
| Note that the cleaner sends the html to DirtyMarkup for formatting. | |
| Example input: | |
| <div class=WordSection1> | |
| <p class=MsoNormal align=center style='text-align:center'><span | |
| style='font-size:16.0pt;line-height:107%;font-family:"Abadi Extra Light",sans-serif'>Test | |
| Clean<o:p></o:p></span></p> |
This file contains hidden or 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
| <?php | |
| /* | |
| Takes a Wordpress Post export and changes the case of the words in the <title> tag to title-case. | |
| This will print out a list of titles at the top with the title case and then the original case, so | |
| you can check over and make sure that you don't need to add any special cases: | |
| Add acronyms or words with non-standard capitalization to the array $caps_words. (note, add spaces | |
| around the word/phrase i.e. ' GitHub '. | |
| To update existing posts requires a temporary addition to your functions file -- |
This file contains hidden or 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
| # --background=00000000 makes a transparent background, to make it easier for placement in other materials | |
| qrencode -s 60 -l H --background=00000000 -o "output.png" "https://www.asdf.com/querty" | |
| pngcrush output.png output_c.png |