Skip to content

Instantly share code, notes, and snippets.

View crashGoBoom's full-sized avatar

Christopher Mundus crashGoBoom

View GitHub Profile
@crashGoBoom
crashGoBoom / video_from_text.sh
Last active January 27, 2019 19:01
Create video from text
# This will create a 5 second long mp4 file using the provided font, text and image with a fade in and out effect.
_dur=5
_framerate=30
_fontfile='/tmp/somefont.ttf'
_fontsize=30
_fontcolor='white'
_text='Sample Bumper Video'
_background_color='black'
_drawtext="fontfile=${_fontfile}:fontsize=${_fontsize}"
_fade="fade=in:0:25,fade=out:50:60"
@crashGoBoom
crashGoBoom / example_get_opts.sh
Created January 17, 2019 21:45
Example of parsing sub commands in a function with getopts
function get_help() {
cat <<help_message
--- script subcommand -------------------------------------------------------------
Commands related to this script
USAGE:
script command shell [FLAGS] [SUBCOMMAND]

Keybase proof

I hereby claim:

  • I am crashgoboom on github.
  • I am chriskindlyops (https://keybase.io/chriskindlyops) on keybase.
  • I have a public key ASAdlzW_WEQVZ-2rQwqnnypvIWObjnNO3SbnQYEY_lE5kQo

To claim this, I am signing this object:

@crashGoBoom
crashGoBoom / installingLaravelMac
Last active January 26, 2018 22:41
Installing Laravel - Mac
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
# to fix this error "file_put_contents(./composer.json): failed to open stream: Permission denied"
# take ownership of the .composer folder.
sudo chown -R $USER ~/.composer
# next install laravel
composer global require "laravel/installer"
@crashGoBoom
crashGoBoom / ffmpeg_batch_examples.txt
Last active January 10, 2019 20:06
ffmpeg batch conversion
# Convert 4:3 aspect ratio files to 16:9 with black bars. For each m4v file convert and encode using crf 18.
for i in *.m4v; do ffmpeg -i "$i" -vf "scale=960x720,setsar=1,pad=1280:720:160:0" -crf 18 "${i%.m4v}.mp4"; done
# For normal conversion to mp4.
for i in *.m4v; do ffmpeg -i "$i" "${i%.m4v}.mp4"; done
# For mov to mp4 conversion with some compression.
for i in *.mov; do ffmpeg -i "$i" -crf 23 -vcodec libx264 -acodec aac "${i%.mov}.mp4"; done