Skip to content

Instantly share code, notes, and snippets.

View essejmclean's full-sized avatar
👨‍💻
Writing code and pixel pushing

Jesse McLean essejmclean

👨‍💻
Writing code and pixel pushing
View GitHub Profile
@bryanltobing
bryanltobing / zod-file-validation.tsx
Last active January 24, 2024 01:14
Zod schema to validate input type file
import { z } from "zod"
const schema = z.object({
file:
typeof window === "undefined" // this is required if your app rendered in server side, otherwise just remove the ternary condition
? z.undefined()
: z
.instanceof(FileList)
.refine(file => file.length !== 0, {
message: "File is required",
const { default: Schema } = require("@sanity/schema");
const { htmlToBlocks, randomKey } = require("@sanity/block-tools");
const { JSDOM } = require("jsdom");
const schemaBlog = Schema.compile({
name: "myBlog",
types: [
{
title: "Hjelpeartikkel",
name: "hjelpeartikkel",
@essejmclean
essejmclean / uiColor.js
Last active August 9, 2020 01:05
iOS UIColor for the System UI theme specification
import { rgba } from "polished";
export default {
label: [
rgba(0, 0, 0, 1),
rgba(60, 60, 67, 0.6),
rgba(60, 60, 67, 0.3),
rgba(60, 60, 67, 0.18),
],
fill: [
@tony-caffe
tony-caffe / Contract Killer 3.md
Last active March 3, 2024 14:50 — forked from malarkey/Contract Killer 3.md
The latest version of Bytes Unlimited ‘Contract Killer’ for web professionals

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Revised by Bytes Unlimited : Feb 3rd 2020

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 26, 2024 02:45
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);