Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
import * as firebase from 'firebase/app'; | |
import 'firebase/firestore'; | |
var firebaseConfig = { | |
// your firebase credentials | |
}; | |
// Initialize Firebase | |
firebase.initializeApp(firebaseConfig); |
#!/bin/bash | |
FILENAME=big-file.csv | |
HDR=$(head -1 $FILENAME) | |
split -l 400 $FILENAME xyz | |
n=1 | |
for f in xyz* | |
do | |
if [ $n -gt 1 ]; then | |
echo $HDR > Part${n}.csv | |
fi |
# Install Google Cloud SDK and Components | |
printHeading "Install Google Cloud SDK and Components" | |
printStep "Google Cloud SDK" "brew install --cask google-cloud-sdk" | |
printDivider | |
echo "✔ Prepping Autocompletes and Paths" | |
source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc" | |
source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc" | |
printDivider | |
if [ -e ~/google-cloud-sdk ]; then | |
echo "✔ ~/google-cloud-sdk exists. Skipping" |
# Script accepts 5 parameters: input file, output folder, filename, -crf and number of pixels in width for scale options | |
# Validate that all parameters are passed | |
if [ $# -ne 5 ]; then | |
echo "Example usage: ffmpeg_crf.sh input.mp4 output-folder output-filename 3840 32" | |
exit 1 | |
fi | |
# Validate that 5th parameter is a number within a range from 0 to 51 | |
if [ $5 -lt 0 ] || [ $5 -gt 51 ]; then |
const getSqlEventParam = ( | |
paramName, | |
paramType = "string", | |
columnName = false | |
) => getUnnestParam(paramName, paramType, columnName); | |
const getSqlUserProperty = ( | |
paramName, | |
paramType = "string", | |
columnName = false |
'use strict'; | |
(function() { | |
// Configuration constants | |
const POSTHOG_API_KEY = 'POSTHOG_API_KEY'; | |
const POSTHOG_HOST = 'https://us.posthog.com'; | |
// Checks if PostHog library is loaded, logs error if not | |
if (typeof posthog === 'undefined') { | |
console.error('PostHog library not loaded'); |