Skip to content

Instantly share code, notes, and snippets.

Rangi rangiTM

Block or report user

Report or block rangiTM

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
View migrate.sh
#!/bin/bash
# Migrates the database from your Trellis/bedrock/sage remote server to your local box, and syncs the WP uploads folder as a bonus. It will ruthlessly overwrite your local database, so be careful.
WEB_USER="web" # or root, using web makes files have the correct permissions for WP
WEB_URL=""
LOCAL_URL="192.168.50.5"
VAGRANT_ID="" # $ vagrant global-status
WP_DIR="" #/srv/www/(sitename)
LOCAL_DIR="" # /users/... (sitename)/site/web/app/uploads/
@rangiTM
rangiTM / gist:dcfa33045f123776079846dfec76adc1
Last active Jul 5, 2016
Record audio as WAV and stream to Facebook live with photo
View gist:dcfa33045f123776079846dfec76adc1
ffmpeg -f avfoundation -thread_queue_size 512 -video_size 1280x720 -framerate 30 \
-i "Logitec:Blue" \
-acodec copy "raw.wav" \
-i logo.png -filter_complex "overlay=main_w-overlay_w-10:main_h-overlay_h-10[logo]" \
-f flv -map "[logo]" -map 0:a -ac 2 -ar 44100 -vcodec libx264 -g 60 -keyint_min 30 -b:v 2500k -minrate 2500k -maxrate 2500k -pix_fmt yuv420p -s 1280x720 -preset ultrafast -tune film -af "volume=2" -acodec libfdk_aac -threads 0 -strict normal -bufsize 2500k \
"rtmp..."
ffmpeg -f avfoundation -thread_queue_size 512 -video_size 1280x720 -framerate 30 \
-i "0:" \
-f flv -vcodec libx264 -g 60 -keyint_min 30 -b:v 3000k -minrate 3000k -maxrate 3000k -pix_fmt yuv420p -s 1280x720 -preset ultrafast -tune film -bufsize 3000k \
@rangiTM
rangiTM / gist:7528823
Last active Aug 4, 2018
Correctly sync audio when using AirPlay speakers in VLC
View gist:7528823
/Applications/VLC.app/Contents/MacOS/VLC --macosx-audio-device="39" --audio-desync="-2000"
You can’t perform that action at this time.