Skip to content

Instantly share code, notes, and snippets.

View andrew-codes's full-sized avatar

Andrew Smith andrew-codes

View GitHub Profile
@andrew-codes
andrew-codes / usage-example.jsx
Last active November 8, 2021 19:49
Idea for form family of components
// Format for a validation rule; many can be composed in different ways for more complex rules.
const isRequired = (message) => (value) => (value === '' || !value) ? message : false;
const [handleSubmit, handleReset] = useForm();
// Could optionally expose the formState in case of conditional rendering of fields.
// const [formState, ...] = useForm();
// or per field
// const [value, isValid, touched] = useForm('name');
// Form handles form's state; including data, validation, focus state (has a value been touched), etc.
@andrew-codes
andrew-codes / OSX Tools.md
Last active May 1, 2020 16:00
Developer Workbench

‎‎​

@andrew-codes
andrew-codes / Verification.txt
Created September 13, 2019 11:44
Blockstack Verification
Verifying my Blockstack ID is secured with the address 1KyReofdZFyMPstryF9y3n5Asup4yGE7iC https://explorer.blockstack.org/address/1KyReofdZFyMPstryF9y3n5Asup4yGE7iC
@andrew-codes
andrew-codes / install.sh
Last active August 24, 2019 18:58
hass.io setup on Intel NUC
apt-get install software-properties-common
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat
curl -fsSL get.docker.com | sh
curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s -- -m intel-nuc
@andrew-codes
andrew-codes / osx-tools.md
Created October 3, 2017 16:16
OSX tools

Keybase proof

I hereby claim:

  • I am andrew-codes on github.
  • I am andrew_codes (https://keybase.io/andrew_codes) on keybase.
  • I have a public key ASAvY2wS41xaFyJ6qHtGyfcgpXhkua7BZjgRqa3lTVjnuwo

To claim this, I am signing this object: