Skip to content

Instantly share code, notes, and snippets.

View realStandal's full-sized avatar
🦙

Ryan Lockard realStandal

🦙
  • Warren, Michigan
  • 20:41 (UTC -04:00)
View GitHub Profile
@realStandal
realStandal / palette.json
Created November 21, 2022 02:56
RedwoodJS Fluent UI Color Palette
[
{
"paletteName": "RedwoodJS — Fluent UI",
"swatches": [
{
"name": "10",
"color": "360D02"
},
{
"name": "20",
@realStandal
realStandal / ComboboxField.tsx
Last active October 9, 2022 20:46
HeadlessUI Comboxbox integrated with RedwoodJS' form library + Floating UI
import { useCallback, useMemo, useState } from 'react'
import type { ReactNode } from 'react'
import { Combobox, Transition } from '@headlessui/react'
import clsx from 'clsx'
import { useTranslation } from 'react-i18next'
import { useController } from '@redwoodjs/forms'
import type { RegisterOptions } from '@redwoodjs/forms'
const SignupPage = () => {
const { signUp } = useAuth()
const onSignup = () => {
...
const res = await signUp({ username, password, birthDate })
}
export default {
title: 'Test'
}
export const Test = () => <h1>Hello World!</h1>
@realStandal
realStandal / Dockerfile.api
Created September 28, 2021 04:02
RedwoodJS API and Web-side Dockerfiles
#==
# Base
FROM node:14-alpine as base
WORKDIR /app
COPY package.json package.json
COPY yarn.lock yarn.lock
COPY redwood.toml redwood.toml
@realStandal
realStandal / overwrite-path-webpack.config.js
Created September 20, 2021 05:03
RedwoodJS - Alter built web-side resources to have a prepended path (not `/`)
// This file should be placed in web/config/webpack.config.js
module.exports = (config, { mode }) => {
const isDev = mode === 'development'
config.output.publicPath = isDev ? '/' : '/cerberus'
return config
}
@realStandal
realStandal / blockbench-to-unreal-engine-5.md
Last active October 2, 2023 22:28
Blockbench to Unreal Engine 5

The following is how an object can be exported from Blockbench and imported to Unreal Engine 5.

Objects can be created in Blockbench according to its intended scale (16 pixels = 1 meter).

Objects should be exported from BB in the .obj format.

The .obj can be imported into Unreal Engine, just like any other asset.

A rotation should be applied to the object should be applied, used to normalize coordinates from Blockbech to UE.

  • X: 90
yarn run v1.22.10
$ C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus\node_modules\.bin\rw storybook
$ C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus\node_modules\.bin\msw init C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus\web\public --no-save
$ C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus\node_modules\.bin\start-storybook --config-dir ../node_modules/@redwoodjs/core/config/storybook --port 7910 --no-version-updates --static-dir C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus\web\public
Initializing the Mock Service Worker at "C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus\web\public"...
Service Worker successfully created!
C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus\web\public\mockServiceWorker.js
Continue by creating a mocking definition module in your application:
yarn run v1.22.10
$ C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus_storybook\node_modules\.bin\rw storybook
$ C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus_storybook\node_modules\.bin\msw init C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus_storybook\web\public --no-save
$ C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus_storybook\node_modules\.bin\start-storybook --config-dir ../node_modules/@redwoodjs/core/config/storybook --port 7910 --no-version-updates --static-dir C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus_storybook\web\public
Initializing the Mock Service Worker at "C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus_storybook\web\public"...
Service Worker successfully created!
C:\Users\ryans\OneDrive\Desktop\LockTech\cerberus_storybook\web\public\mockServiceWorker.js
Continue by creating a mocking definition module in your application:
@realStandal
realStandal / ReedwoodApolloProvider.tsx
Last active May 4, 2021 22:26
Updated `RedwoodApolloProvider` providing full custom-`useAuth` pass through.
import {
ApolloProvider,
ApolloClientOptions,
ApolloClient,
ApolloLink,
InMemoryCache,
useQuery,
useMutation,
createHttpLink,
} from '@apollo/client'