Skip to content

Instantly share code, notes, and snippets.

View dillon's full-sized avatar
🏹
Focusing

dillon

🏹
Focusing
View GitHub Profile
@dillon
dillon / regex.md
Last active January 6, 2021 19:01

Regex for internal slug:

^[a-z0-9]+(?:-[a-z0-9]+)*$

Regex for external URL:

^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-/]))?$

Regex for external OR internal slug:

Standards

Github commits

fix(scope): commit message

examples: fix(atf): fix(typography): adjust line-height to be responsive fix(components):

@dillon
dillon / PersistingContext.js
Last active December 18, 2019 23:14
Persist React Context to local state
import React from 'react';
const initialState = {
location: null,
doctor: null,
dateTime: null,
firstName: null,
lastName: null,
email: null,
phone: null,
// note: video doesn't autoplay when iOS's battery saving mode is on
const VideoContainer = styled.div`
position: absolute;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: -1;
tell application "Adobe InDesign CS6"
set custom monitor ppi of general preferences to 72
set use custom monitor resolution of general preferences to true
end tell

npm

npm i -D eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react prettier eslint-config-prettier eslint-plugin-prettier

yarn

yarn add --dev eslint eslint-config-airbnb eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react prettier eslint-config-prettier eslint-plugin-prettier

create config files

Keybase proof

I hereby claim:

  • I am dillon on github.
  • I am dillon9 (https://keybase.io/dillon9) on keybase.
  • I have a public key ASDgj6V-3yyKTPYFqfXK8QA5WmN9iAhxSerFJVyILKF04go

To claim this, I am signing this object:

@font-face {
font-family: 'Inter UI';
font-style: normal;
font-weight: 100;
src: url("font-files/Inter-UI-Thin.woff2?v=3.2") format("woff2"),
url("font-files/Inter-UI-Thin.woff?v=3.2") format("woff");
}
@font-face {
font-family: 'Inter UI';
font-style: italic;