Skip to content

Instantly share code, notes, and snippets.

View LinnJS's full-sized avatar
🎯
Focusing

Justin Linn LinnJS

🎯
Focusing
View GitHub Profile
@LinnJS
LinnJS / brew-scaffold-script.sh
Last active June 7, 2023 16:59
brew-scaffold-script.sh
#!/bin/sh
# Homebrew Script for OSX
# To execute: save and run command `chmod +x ./brew-scaffold-script.sh && ./brew-scaffold-script.sh`
echo "Installing homebrew 🍺..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Set HOME path for homebrew
echo "Configuring homebrew 🎉..."
@monecchi
monecchi / Image.tsx
Created February 26, 2021 14:57
Integrate NextJs `next/image` with Chakra-UI styling
import { chakra, ThemingProps, useStyleConfig } from '@chakra-ui/react'
import NextImage, { ImageProps as NextImageProps } from 'next/image'
import { ReactElement } from 'react'
import { Sizes } from '../../theme/variables/image'
// TODO review props when NextJs is updated so we don't have to defined it here
/**
* ? Because NextJs typing is preventing auto-suggest for layout, width and height,
* ? we declare the styles differently in this component and will manage the switch
* ? to NextJs typings when calling NextJs `next/image` component
@benknight
benknight / README.md
Last active August 16, 2023 04:59
[use-carousel] Headless UI React hook for building a scroll-based carousel

[use-carousel] Headless UI React hook for building a scroll-based carousel

BYO-UI. No CSS necessary. Inspired by react-table.

Usage:

const {
  getLeftNavProps,
 getRightNavProps,
const item = 'FOOBerries!'
// Anti-pattern, don't do this!
this.state.list.push(item)
this.setState({ list: this.state.list })
// Correct way to do what the anti-pattern did:
const nextState = this.state.list.slice()
nextState.push(item)
this.setState({ list: nextState })
@jednano
jednano / gitcom.md
Last active May 31, 2023 08:23
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init