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
// https://remix.run/docs/en/v1/api/remix#createsessionstorage | |
import type { Cookie } from '@remix-run/node' | |
import { createSessionStorage } from '@remix-run/node' | |
import crypto from 'crypto' | |
import cuid from 'cuid' | |
import { differenceInMilliseconds, differenceInSeconds } from 'date-fns' | |
import fs from 'fs' | |
import type { RedisOptions } from 'ioredis' | |
import Redis from 'ioredis' | |
import LRUCache from 'lru-cache' |
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
{"lastUpload":"2020-04-29T20:54:25.373Z","extensionVersion":"v3.4.3"} |
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
const crypto = require('crypto') | |
crypto.randomBytes(128).toString('base64') |
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
const contactPostalSendMachine = Machine( | |
{ | |
id: 'postal', | |
initial: 'postal', | |
context: { | |
postal: null, | |
variant: null, | |
messages: null | |
}, | |
states: { |
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 { useState, useEffect, useCallback } from "react"; | |
export const useForm = (initialState, formRef) => { | |
const [isValid, setValid] = useState(false); | |
const [errors, setErrors] = useState({}); | |
const [form, setForm] = useState(initialState); | |
const checkValidity = useCallback(() => { | |
if (formRef && formRef.current) { | |
const validity = formRef.current.checkValidity(); | |
const formData = new FormData(formRef.current); |
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
{"lastUpload":"2020-04-29T20:52:42.239Z","extensionVersion":"v3.4.3"} |
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
{"lastUpload":"2019-01-11T03:13:45.543Z","extensionVersion":"v3.2.4"} |
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
#!/bin/bash | |
ICON_SRC="src/res/icon-master.png" | |
## ANDROID | |
ICON_DIR="build/platforms/android/res" | |
mkdir -p $ICON_DIR | |
convert $ICON_SRC -resize 36x36 "${ICON_DIR}/drawable-ldpi/icon.png" | |
convert $ICON_SRC -resize 48x48 "${ICON_DIR}/drawable-mdpi/icon.png" | |
convert $ICON_SRC -resize 72x72 "${ICON_DIR}/drawable-hdpi/icon.png" |