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
# Run this when wanting to import a pr into your repo | |
# You run it locally from your main branch and then it'll check out a branch locally and sync the commit keeping author/email. | |
# You then push up and merge whenever then it'll sync to your public repo. | |
npx monorepo-importit --committer-name=A --committer-email=B --pull-request=https://github.com/adeira/js/pull/1 |
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
Michael Dougall | |
Software Grant and Corporate Contributor License Agreement (“Agreement”) | |
In order to clarify the intellectual property license granted with Contributions from any person or entity, Michael Dougall must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Michael Dougall; it does not change your rights to use your own Contributions for any other purpose. | |
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Michael Dougall. Except for the license granted herein to Michael Dougall and recipients of software distributed by Michael Dougall, You reserve all right, title, and interest in and to Your Contributions. | |
Definitions. | |
"You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with |
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 Cylinder from "@/cylinder"; | |
import Box from "src/box"; | |
import { RoundedBox } from "@react-three/drei"; | |
import Sphere from "./sphere"; | |
export function SceneAlt() { | |
return ( | |
<> | |
<Box /> | |
</> |
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 { Application, Router, RouterContext } from 'https://deno.land/x/oak@v11.1.0/mod.ts'; | |
import { | |
JsxAttributeLike, | |
Project, | |
SyntaxKind, | |
SourceFile, | |
ts, | |
Type, | |
JsxSelfClosingElement, | |
JsxOpeningElement, |
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 { useFrame, useThree } from '@react-three/fiber'; | |
import { useLayoutEffect, useMemo } from 'react'; | |
import { Camera, Vector3, Vector3Tuple } from 'three'; | |
import CSM, { Params } from 'three-csm'; | |
interface CascadedShadowMapProps extends Omit<Params, 'lightDirection' | 'camera' | 'parent'> { | |
fade?: boolean; | |
lightDirection?: Vector3Tuple; | |
} |
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
// Dirty hack to get generics working with forward ref [1/2] | |
interface CustomItemType { | |
<TComponentProps extends {}>( | |
props: CustomItemProps<TComponentProps> & { ref?: any } & Omit< | |
TComponentProps, | |
keyof CustomItemComponentProps | |
>, | |
): JSX.Element | 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
import { Component, ReactNode, Ref, createRef } from 'react'; | |
export class ResizingContainer extends Component { | |
childRef = createRef(); | |
getSnapshotBeforeUpdate() { | |
if (!this.childRef.current) { | |
return 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
export const listenTo = <K extends keyof DocumentEventMap>( | |
type: K | K[], | |
listener: (this: Document, ev: DocumentEventMap[K]) => any, | |
options?: boolean | AddEventListenerOptions | |
) => { | |
if (Array.isArray(type)) { | |
type.forEach(typ => { | |
document.addEventListener(typ, listener, options); | |
}); |
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 * as React from 'react'; | |
type Omit<T, K extends keyof any> = T extends any ? Pick<T, Exclude<keyof T, K>> : never; | |
type ExtractProps<TComponentOrTProps> = TComponentOrTProps extends React.ComponentType< | |
infer P | |
> | |
? P | |
: never; | |
interface InjectedProps { |
NewerOlder