Skip to content

Instantly share code, notes, and snippets.

View parkournick3's full-sized avatar
🥝

Nicolas parkournick3

🥝
View GitHub Profile
@parkournick3
parkournick3 / ruby.txt
Last active March 9, 2024 20:55
How to install Ruby and Ruby on Rails on ubuntu
cd $HOME
sudo apt update
sudo apt install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
@parkournick3
parkournick3 / useTailwindBreakpoint.ts
Last active May 27, 2023 16:07 — forked from SimeonGriggs/useTailwindBreakpoint.js
React (and NextJS, Typescript) Hook which returns the current TailwindCSS breakpoint size based on the current window width.
import { useEffect, useState } from 'react'
import throttle from 'lodash.throttle'
import resolveConfig from 'tailwindcss/resolveConfig'
import tailwindConfig from '../../tailwind.config'
type Breakpoint = 'sm' | 'md' | 'lg' | 'xl' | '2xl'
const findKeyByValue = (object: { [x: string]: unknown }, value: string) =>