This file contains hidden or 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 { useId, useRef, useState } from 'react' | |
import { Button } from '@/components/Button' | |
import { CheckCircleIcon, ClockIcon } from '@heroicons/react/20/solid' | |
import { ExclamationTriangleIcon } from '@heroicons/react/24/outline' | |
export function SignUpForm() { | |
const id = useId() | |
const form = useRef() | |
const [subsciptionState, setSubscriptionState] = useState('idle') |
This file contains hidden or 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
google.*##.g:has(a[href*="w3schools.com"]) | |
google.*##.g:has(a[href*="geeksforgeeks.com"]) | |
google.*##.g:has(a[href*="geeksforgeeks.org"]) | |
google.*##.g:has(a[href*="tutorialspoint.com"]) | |
google.*##.g:has(a[href*="tutorialspoint.dev"]) | |
google.*##.g:has(a[href*="freetimelearning.com"]) | |
google.*##.g:has(a[href*="w3docs.com"]) | |
google.*##.g:has(a[href*="javatpoint.com"]) |
This file contains hidden or 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 { ComponentType } from "react" | |
import { useState, useEffect } from "react" | |
function useTyping(str, speed = 20) { | |
const [pos, setPos] = useState(0) | |
useEffect(() => { | |
let i = 0 | |
let interval = setInterval(() => { | |
if (i < str.length) { | |
setPos(++i) |
This file contains hidden or 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 { useEffect, useRef, useState } from "react" | |
import { addPropertyControls, ControlType } from "framer" | |
// This is an unanimated 4 color gradient code component for Framer. | |
// TODO: support animation | |
function rgbToHex(rgb) { | |
if (rgb.startsWith("rgb(")) { | |
// Choose correct separator | |
let sep = rgb.indexOf(",") > -1 ? "," : " " |
This file contains hidden or 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 url = `https://projects.fivethirtyeight.com/2020-election-forecast/us_simulations.json`; | |
const req = new Request(url); | |
const res = await req.loadJSON(); | |
if (config.runsInWidget) { | |
const biden = res[0].simulations.filter((x) => x.winner === 'Biden').length; | |
const trump = res[0].simulations.filter((x) => x.winner === 'Trump').length; | |
let widget = new ListWidget(); | |
widget.backgroundColor = new Color('#000'); |
This file contains hidden or 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
{ | |
"flow.enabled": false, | |
"search.useIgnoreFiles": true, | |
"typescript.autoImportSuggestions.enabled": false, | |
"workbench.editor.enablePreview": false, | |
"javascript.suggestionActions.enabled": false, | |
"javascript.implicitProjectConfig.experimentalDecorators": true, | |
"files.autoSave": "onFocusChange", | |
"files.exclude": { | |
"**/.cache": true, |
This file contains hidden or 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
#!/usr/bin/env bash | |
if [[ $# -eq 0 ]] ; then | |
echo 'Invalid component name.' | |
exit 1 | |
fi | |
COMPONENT_PATH="$(pwd)/Components/$1" | |
mkdir $COMPONENT_PATH; |
This file contains hidden or 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
#!/usr/bin/env bash | |
if [[ $# -eq 0 ]] ; then | |
echo 'Invalid component name.' | |
exit 1 | |
fi | |
COMPONENT_PATH="$(pwd)/js/common/$1" | |
mkdir $COMPONENT_PATH; |