Skip to content

Instantly share code, notes, and snippets.

@ebual
ebual / Convert_to_GIF
Created January 14, 2021 09:30
Mac Automator script for converting a video file to GIF
#!/bin/bash
originalFilePath=$1
#extension=$(echo "$originalFilePath" | rev | cut -d"." -f1 | rev)
pathWithoutExtension=$(echo "$originalFilePath" | rev | cut -d"." -f2- | rev)
/Applications/ffmpeg -i "$originalFilePath" -filter_complex "[0:v] fps=15,split [a][b];[a] palettegen [p];[b][p] paletteuse" "$pathWithoutExtension.gif"
@ebual
ebual / Convert_to_MP4
Created January 14, 2021 09:29
Mac Automator Script for converting MOV to MP4
#!/bin/bash
originalFilePath=$1
#extension=$(echo "$originalFilePath" | rev | cut -d"." -f1 | rev)
pathWithoutExtension=$(echo "$originalFilePath" | rev | cut -d"." -f2- | rev)
/Applications/ffmpeg -i "$originalFilePath" "$pathWithoutExtension.mp4"
if [ $? -eq 0 ]; then
rm -f "$originalFilePath"
fi
@ebual
ebual / gitprune.sh
Created October 26, 2020 12:42
Gitprune
alias gitpruneorigin="git remote update origin --prune >/dev/null 2>&1"
alias gitprune='gitpruneorigin && git branch -r | awk '"'"'{print $1}'"'"' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '"'"'{print $1}'"'"' | xargs git branch -D'
@ebual
ebual / artifactory-npm-deprecated.md
Created July 1, 2019 15:51
How to deprecate a NPM package in Artifactory

How to deprecate a NPM package in Artifactory

Why this guide

Artifactory does not support npm-deprecate.

Step by step

You can apply a deprecated message to a package or to a specific version of a package.