Skip to content

Instantly share code, notes, and snippets.

#!/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/
@kohmaeda
kohmaeda / gist:dcfa33045f123776079846dfec76adc1
Last active July 5, 2016 04:11
Record audio as WAV and stream to Facebook live with photo
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 \
@kohmaeda
kohmaeda / gist:7528823
Last active November 10, 2020 13:05
Correctly sync audio when using AirPlay speakers in VLC
/Applications/VLC.app/Contents/MacOS/VLC --macosx-audio-device="39" --audio-desync="-2000"