This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isStoryblokAsset(object: unknown): object is AssetStoryblok { | |
return (object as AssetStoryblok)?.filename !== undefined; | |
} | |
const Picture = forwardRef< | |
HTMLImageElement, | |
PictureProps & ImgHTMLAttributes<HTMLImageElement> | |
>(({ src, lazy, ...props }, ref) => { | |
const internalRef = useRef<HTMLImageElement>(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
const performanceCookieCategory = '2,'; | |
function waitForOneTrust() { | |
hasOneTrustLoaded(); | |
let attempts = 0; | |
const interval = setInterval(function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { ZodType, z } from "zod"; | |
import { zodResolver } from "@hookform/resolvers/zod"; | |
import { getValidatedFormData as getValidatedFormDataPrimitive, useRemixForm as useForm, UseRemixFormOptions } from "remix-hook-form"; | |
interface UseRemixFormZodOptions<T extends ZodType, U extends FromZodType<T>> extends UseRemixFormOptions<U> { | |
schema: T; | |
} | |
export type FromZodType<T extends ZodType> = z.infer<T>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
UPDATE: Now you can use this theme to more easily manage your redirects: | |
https://github.com/benjaminsehl/shopify-headless-theme | |
{% endcomment %} | |
{% assign new_website = 'https://headless-website.com/' %} | |
<!doctype html> | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (user, context, callback) { | |
if (context.clientMetadata && context.clientMetadata.shopify_domain && context.clientMetadata.shopify_multipass_secret) | |
{ | |
const RULE_NAME = 'shopify-multipasstoken'; | |
const CLIENTNAME = context.clientName; | |
console.log(`${RULE_NAME} started by ${CLIENTNAME}`); | |
const now = (new Date()).toISOString(); | |
let shopifyToken = { | |
email: user.email, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Change caps_lock to Esc and Control", | |
"rules": [ | |
{ | |
"description": "Post Esc if Caps is tapped, Control if held.", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- Elevar Base Data Layer ----!> | |
{% if customer %} | |
window.dataLayer.push({ | |
"event": "dl_user_data" | |
"event_id": {{ uuid }} // unique uuid for FB conversion API | |
"cart_total": "{{ cart.total_price }}", | |
"user_properties": { | |
"visitor_type": "logged_in", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installation | |
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
# Easy Peasy | |
ffmpeg -i video.mp4 video.webm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install ffmpeg: | |
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid | |
2. Convert: | |
ffmpeg -i input-file.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis output-file.webm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
body { margin: 0; } | |
.vimeo-container { | |
padding: 0; | |
width: 100%; | |
height: 100vh; | |
overflow: hidden; | |
position: relative; | |
} | |
iframe { |
NewerOlder