Skip to content

Instantly share code, notes, and snippets.

@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@mercedesb
mercedesb / ContextExample.js
Created September 20, 2020 17:27
An example for how I like to setup my React contexts to make them super easy to consume
// the provider component (I usually have a folder called 'contexts')
import React, { useState, useEffect, createContext } from 'react'
export const FancyContext = createContext({ fancyThing: null, setFancyThing: () => {} })
export function FancyProvider({ children }) {
const [fancy, setFancy] = useState({})
useEffect(() => {
// get the data you want, however you want (this is pseudocode)