Skip to content

Instantly share code, notes, and snippets.

Bryan Willis bryanwillis7

  • Marietta, GA
Block or report user

Report or block bryanwillis7

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bryanwillis7 / zeroBegone.txt
Created Aug 22, 2018
Batch Remove or Replace characters from file names
View zeroBegone.txt
#For use with a set of sequential files that contain extra zeroes. ex: file001.jpg, file002.jpg, file003.jpg ect.
#Replace <firstPartOfName> with everything up until the bit you want to remove. No brackets.
#replace <removeThis> with what you need removed, <replaceWithThis> for what you want in its place.
#You can leave <replaceWithThis> blank if you simply want to remove.
for file in <firstPartOfName>*; do
new_name=$(echo "$file" | sed -E -e 's/<removeThis>+/<replaceWithThis>/')
mv "$file" "$new_name"
bryanwillis7 / trim_slow_gif.txt
Created Aug 22, 2018
Remove every other frame & slow down gif animation in Linux
View trim_slow_gif.txt
#Get the number of frames from the gif:
identify -format "%n\n" path/to/file.gif | head -1
#Use gifsicle to cut frames. replace 99 with total frames.
gifsicle -U input.gif `seq -f "#%g" 0 2 99` -O2 -o output.gif
#Delay gif via gifsicle by first finding the delay between frames, double it
gifsicle -I input.gif
#Proceed to delay. Replace 50 with the doubled number
gifsicle --delay 50 in.gif > out.gif
You can’t perform that action at this time.