- colorincode.me
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 gsap from "https://esm.sh/gsap"; | |
import { TextPlugin } from "https://esm.sh/gsap/all"; | |
import { EasePack } from "https://esm.sh/gsap/EasePack"; | |
import confetti from "https://esm.sh/canvas-confetti"; | |
gsap.registerPlugin(TextPlugin, EasePack); | |
let currentStep = 1; | |
const totalSteps = 10; | |
const quizData = {}; |
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 { serve, HTMLBundle, Server } from "bun"; | |
import { watch } from "fs"; | |
import { join } from "path"; | |
import { buildProject, runBuild} from "./bun_build"; | |
import { URL } from "url"; | |
// const clients = new Set<new WebSocket("ws://localhost:8080")>; | |
let hostname = "localhost"; |
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
// this is an intersection observer in cases where you have video that is outta focus | |
function setupVideoObservers() { | |
const videos = document.querySelectorAll('.some-video'); | |
let currentVideo: HTMLVideoElement | null = null; | |
const observer = new IntersectionObserver((entries) => { | |
entries.forEach(entry => { | |
const video = entry.target as HTMLVideoElement; | |
if (entry.isIntersecting) { | |
video.play(); |
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
# not for you mr robot | |
## Google Fam | |
# ----------------- | |
User-agent: Googlebot | |
User-agent: Mediapartners-Google | |
Disallow: /*/feed | |
Disallow: /?s= | |
## Other SE |
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
<!--//////////////////////////////////////////////////////////////////////////////////////// | |
/// /// | |
/// Example Using Three.js Library, HTML, CSS & JavaScript /// | |
// 3D Interactive Web Apps & Games 2021-2024 /// | |
/// Contact Shane Brumback https://www.shanebrumback.com /// | |
/// Send a message if you have questions about this code /// | |
/// I am a freelance developer. I develop any and all web. /// | |
/// Apps Websites 3D 2D CMS Systems etc. Contact me anytime :) /// | |
/// /// | |
////////////////////////////////////////////////////////////////////////////////////////////--> |
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
// leaving as-is for now | |
function factorial(n: bigint, x = 1n): bigint { | |
if (n <= 1) return x; | |
return factorial(n - 1n, n * x); | |
} | |
function factorialAux(n: bigint, x = 1n): bigint | Thunk<bigint> { | |
if (n <= 1) return x; | |
return () => factorial(n - 1n, n * x); | |
} |
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
/** | |
* Transforms a function that returns either a direct value or a thunk (a | |
* no-argument function that returns a value) into a function that only returns | |
* a direct value. It does this by repeatedly evaluating the function if it | |
* returns a thunk, until a direct value is obtained. | |
* | |
* @template T The type of the value to be returned by the trampoline function. | |
* @template A The type tuple representing the argument types accepted by the | |
* function `f`. | |
* @param f A function that takes arguments of type `A` and returns either a |
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 { readFileSync, statSync, existsSync } = require('fs') | |
const mime = require('mime') | |
const CSSAsset = require(`parcel-bundler/${parseInt(process.versions.node, 10) < 8 ? 'lib' : 'src'}/assets/CSSAsset`) | |
const { dirname, join, resolve, extname, normalize, relative } = require('path') | |
const projectRootPath = resolve(__dirname, '../../../') | |
const parcelrcPath = join(projectRootPath, '.parcelrc') | |
const getConfig = () => existsSync(parcelrcPath) ? JSON.parse(readFileSync(parcelrcPath))['css-url-loader'] : {} | |
const EXTS = ['png', 'svg', 'jpg', 'gif', 'jpeg'] |