Make sure ffmpeg is up-to-date:
brew update
brew upgrade ffmpeg
Convert a MOV into frames. Tweak the 2/1 if you want more or fewer frames.
| import aiohttp | |
| async def print_pdf(pdf_url, paper_size=None, page_range=None, callback=None): | |
| cups_addon_url = "http://localhost:8099/api/print" | |
| # Prepare the request data with the PDF URL and optional parameters | |
| request_data = { | |
| "endpoint": pdf_url, | |
| "paper_size": paper_size, | |
| "page_range": page_range, | |
| "callback": callback | 
| -- | |
| -- Read only | |
| -- | |
| -- Create a group | |
| CREATE ROLE postgres_ro_group; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; | 
| #!/usr/bin/env bash | |
| #docker run -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg -i bensound-epic.mp3 -acodec pcm_s16le epic.wav | |
| #docker run -v $(pwd):$(pwd) -w $(pwd) jrottenberg/ffmpeg -i ./YDXJ0061.MP4 -vcodec dnxhd -acodec pcm_s16le -s 1920x1080 -r 30000/1001 -b:v 36M -pix_fmt yuv422p -f mov ./YDXJ0061.mov | |
| BASH_XTRACEFD=3 | |
| set -xeuo pipefail | |
| # Optional ENV variables: | |
| : "${SOURCE_DIR:=`pwd`}" | 
| #!/usr/bin/env bash | |
| # | |
| filename="$(basename -- "$1")" | |
| extension="${filename##*.}" | |
| filename="${filename%.*}" | |
| outputPath=${OUTPUT_DIR}/${OUTPUT_NAME} | 
| #!/usr/bin/env bash | |
| : "${POLAR_DIR:=$HOME/Sites/polar}" | |
| : "${DOWNLOAD_DIR:=$HOME/Downloads}" | |
| : "${DEVICE_ID:=}" | |
| : "${CLIENT_ID:=}" | |
| : "${CLIENT_SECRET:=}" | |
| : "${REFRESH_TOKEN:=}" | |
| echo "Date?" | 
Make sure ffmpeg is up-to-date:
brew update
brew upgrade ffmpeg
Convert a MOV into frames. Tweak the 2/1 if you want more or fewer frames.
| #!/bin/bash | |
| # Anh Nguyen <[email protected]> | |
| # 2016-04-30 | |
| # MIT License | |
| # This script takes in images from a folder and make a crossfade video from the images using ffmpeg. | |
| # Make sure you have ffmpeg installed before running. | |
| # The output command looks something like the below, but for as many images as you have in the folder. | 
| const AWS = require("aws-sdk"); | |
| const {link} = require("linkfs"); | |
| const mock = require('mock-require'); | |
| const fs = require('fs'); | |
| const tmpDir = require('os').tmpdir(); | |
| exports.handler = (event, context) => { | |
| rewriteFs(); | |
| invokeGatsby(context); | |
| } | 
| #!/bin/bash | |
| printf "Checking PSR2 before pushing\n" | |
| vendor/bin/phpcs --standard=PSR2 src/AppBundle/ tests/ | |
| OUT=$? | |
| if [ $OUT -eq 0 ];then | |
| printf "OK! Pushing...\n" | |
| exit 0 |