Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added a function to transform videos to gif
  • Loading branch information
eko committed Jan 20, 2018
1 parent aa83c62 commit d72d74d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions .brew
Expand Up @@ -18,6 +18,7 @@ echo '--> Install libraries and applications'
# terminal
brew cask install iterm2
brew install bash
brew install ffmpeg
brew install tmux
brew install reattach-to-user-namespace
brew install vim
Expand Down
11 changes: 10 additions & 1 deletion .functions
Expand Up @@ -147,6 +147,15 @@ function digscan() {
set -m;
}

# Transforms a video file to a gif
# Usage: gify <input file> <output file> <start> <duration> [<ratio> <fps>]
function gify {
ratio=${5:-480:270}
fpm=${6:-60}

ffmpeg -i $1 -vf scale=$ratio -r $fpm -ss $3 -t $4 $2
}

# Sets FDN (French Data Network) open DNS servers on a network interface
function opendns() {
echo "Select the network interface:\n1) Belkin USB-C LAN\n2) Wi-Fi"
Expand All @@ -159,7 +168,7 @@ function opendns() {
esac

echo "\n-> Setting open DNS servers on network interface '$selected'"
networksetup -setdnsservers $selected 80.67.169.12 80.67.169.40
networksetup -setdnsservers $selected 9.9.9.9 8.8.8.8
}

# Automatically Starting tmux on SSH
Expand Down

0 comments on commit d72d74d

Please sign in to comment.