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
'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'); |
const getSqlEventParam = ( | |
paramName, | |
paramType = "string", | |
columnName = false | |
) => getUnnestParam(paramName, paramType, columnName); | |
const getSqlUserProperty = ( | |
paramName, | |
paramType = "string", | |
columnName = false |
# 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 |
# 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" |
#!/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 |
import * as firebase from 'firebase/app'; | |
import 'firebase/firestore'; | |
var firebaseConfig = { | |
// your firebase credentials | |
}; | |
// Initialize Firebase | |
firebase.initializeApp(firebaseConfig); |
<!doctype html> | |
<html> | |
<head> | |
<style> | |
html, body { | |
font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Roboto, 'Segoe UI', sans-serif; | |
} | |
.color-grid { | |
display: grid; |
Git Commit Guidelines We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the AngularJS change log.
Commit Message Format Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
():
// This selects the right swipe button class name, and keeps clicking once a second. | |
func = setInterval(function() { | |
var swype = document.getElementsByClassName("recsGamepad__button--like") | |
swype[0].click() | |
}, 100) |