Skip to content

Instantly share code, notes, and snippets.

View cassidoo's full-sized avatar
⌨️
sleepy

Cassidy Williams cassidoo

⌨️
sleepy
View GitHub Profile
@cassidoo
cassidoo / index.html
Created December 3, 2021 18:15
Netlify Form Demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ha ha, Business!</title>
<link rel="stylesheet" href="main.css" />
</head>
<body>
<h1>I am an incredibly fancy business woman</h1>
@cassidoo
cassidoo / human.md
Created October 14, 2021 20:22
Human Template for Obsidian
cuid alias tags
human<% tp.file.creation_date("YYYYMMDD-HHmmss") %>
👤 <% tp.file.title.substring(1) %>
<% tp.file.title.substring(1) %>
person/friends, person/family, person/coworker, person/rwc

👤 <% tp.file.title.substring(1) %>

🎂 Birthday: 💌 Email: ☎️ Phone:

@cassidoo
cassidoo / master-to-main.md
Last active November 23, 2021 18:31
Instructions for `master` to `main` branches

Switch master branch to main branch

Create main branch with history from master

git branch -m master main

Push main branch to GitHub

@cassidoo
cassidoo / copilot-suggestions.js
Last active December 11, 2021 19:05
A gist of all of the functions that Copilot wrote for me
/**
As seen on twitch.tv/cassidoo
*/
// A function that validates an email address
function validateEmail(email) {
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
@cassidoo
cassidoo / DTN.md
Last active March 6, 2024 15:48
Deploy to Netlify Button

Insta-deploy templates to Netlify

Make a Deploy to Netlify button like this:

Deploy to Netlify

With this:

@cassidoo
cassidoo / Igneous.css
Last active December 1, 2021 21:20
An Obsidian theme
/*
IMPORTANT: Change the fonts on lines 31-35 to make this work the way you want!
*/
:root {
--dark0: #2e3440;
--dark1: #3b4252;
--dark2: #434c5e;
@cassidoo
cassidoo / sundays.txt
Created March 31, 2021 01:50
Get Sundays in Google Sheets
=query(ArrayFormula(TO_DATE(row(indirect("E"&A2):indirect("E"&A3)))),"Select Col1 where dayOfWeek(Col1)=1")
let array = [1,2,3,4,5]
10 + 1
11 + 2
13 + 3
16 + 4
20 + 5
let initialState = {
count: 0,
cake: 'fishy'
@cassidoo
cassidoo / contextExample.js
Created July 30, 2020 06:11
An example of component-izing context
//////// Some App file that uses the things we made
import React from "react"
import { LoggedIn, LoggedOut } from "app/thingies"
import { AppStateProvider } from "app/app-state"
import appReducer, { initialState } from "app/appReducer"
function App() {
const { authAttempted, auth } = useAuth()
@cassidoo
cassidoo / ToggleableForm.js
Created July 2, 2020 22:39
A Toggleable form example
import React, { useState, useRef, forwardRef, useEffect, createElement } from 'react';
import ReactDOM from 'react-dom';
const App = () => {
let data = [
{ name: 'Log in', component: LoginForm },
{ name: 'Sign up', component: SignupForm }
]
return (
<section>