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-opusHandy helpers for controlling visibility of elements until Vue has compiled.
Use like:
<div v-cloak>
<h1>
<span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
<span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
| const puts = (...anything) => { | |
| fetch("/api/puts", { | |
| method: 'POST', | |
| headers: { | |
| 'Content-Type': 'application/json' | |
| }, | |
| body: JSON.stringify({content: anything}) | |
| }) | |
| } |
| class AppleSignInController < ApplicationController | |
| APPLE_PEM_URL = "https://appleid.apple.com/auth/keys" | |
| # /api/apple/validate | |
| def validate | |
| name = params[:name] | |
| userIdentity = params[:userIdentity] | |
| jwt = params[:jwt] |
| # This is a thin wrapper of the Simple Form builder. It delegates rendering the resulting form fields to Simple Form | |
| # but typically amends the Tailwind classes of the various elements in the field layout. It tightly integrates with the | |
| # unstyled wrapper (aka `:plain`) Simple Form configuration (see `simple_form.rb`). The methods support the same syntax | |
| # as the original Simple Form methods but enhance it to support replacing defaylt Tailwind claseses. | |
| class Builders::TailwindFormBuilder < SimpleForm::FormBuilder | |
| # This is the basic method for rendering `<input>` tags and their variants. | |
| def input(attribute_name, options = {}, &block) | |
| # The default Tailwind classes for the various parts of the Simple Form wrapper layout. | |
| input_class = "block w-full sm:text-sm ... #{'text-gray-500 bg-gray-50' if options.dig(:input_html, :disabled)}" |