Skip to content

Instantly share code, notes, and snippets.

View ethndotsh's full-sized avatar
🎒
test

ethan ethndotsh

🎒
test
View GitHub Profile
@stonking
stonking / cf-worker-email.md
Created May 13, 2022 19:31
Send email from Cloudflare Workers via MailChannels

Send email from Cloudflare Workers via MailChannels

Cloudflare announced a partnership with MailChannels that allows you to send free email via workers.

The example code that MailChannels supplied wasn't working so I fixed it here to make testing easy.

  1. Add include:relay.mailchannels.net to your domain's SPF record.
  2. Update the code below with your email addresses
  3. Create worker, paste code, save and deploy and test
@ethndotsh
ethndotsh / StepWizard.jsx
Created January 8, 2023 01:55
react-step-wizard Replacement
import React, { useState, useEffect } from "react";
import styles from "./StepWizard.module.css";
export function StepWizard({
children = [],
className = null,
initialStep = 1,
isHashEnabled = false,
isLazyMount = false,
transitions = undefined,
export const chaosTestStrings = (): void => {
const textNodes = getAllTextNodes(document.body);
for (const node of textNodes) {
const textNodeLength = node.textContent ? node.textContent.length : 0;
if (node.textContent === null) {
return;
}
if (node.parentElement instanceof Element) {
if (node.parentElement.dataset.originalText === undefined) {
@ethanniser
ethanniser / ci.yml
Created March 27, 2023 16:06
typecheck/lint on github not on vercel
name: CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
@Sleitnick
Sleitnick / Find.lua
Created August 31, 2023 13:28
Find an instance within the Roblox game hierarchy starting at a given parent. Throws an error if not found. Optional IsA check.
--!strict
--[[
Find(parent: Instance, path: string, [assertIsA: string]): Instance
e.g.
child = Find(parent, "ChildName")
child = Find(parent, "ChildName", "BasePart")
child = Find(parent, "ChildName/Some/Nested/Object")
child = Find(parent, "ChildName/Some/Nested/Object", "BasePart")