Skip to content

Instantly share code, notes, and snippets.

View joeyfigaro's full-sized avatar
:shipit:
Going Rogue

Jay Figaro joeyfigaro

:shipit:
Going Rogue
View GitHub Profile
@joeyfigaro
joeyfigaro / xcode-node-path-fnm.sh
Last active June 24, 2025 15:19
ensure `NODE_BINARY` exists during Xcode build time
# From discussion in schniz/fnm
# https://github.com/Schniz/fnm/issues/475#issuecomment-2672700307
# original author @erkie (https://github.com/erkie)
# No node? Try to load via fnm
if ! command -v node &> /dev/null; then
output=$(zsh -l -c 'source ~/.profile; source ~/.zshrc; eval "$(fnm env --shell=zsh)" && fnm env')
eval "$output"
# if no node is found throw an error
@joeyfigaro
joeyfigaro / tsconfig-oneliners.csv
Created January 3, 2025 13:46 — forked from orta/tsconfig-oneliners.csv
TSConfig one-liners
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 9.
Name,Site,Schema
compilerOptions,"The set of compiler options for your project","Instructs the TypeScript compiler how to compile .ts files"
allowJs,"Let TS include .JS files in imports","Allow javascript files to be compiled."
allowSyntheticDefaultImports,"Allow 'import x from y' when a module doesn't have a default export","Allow default imports from modules with no default export. This does not affect code emit, just typechecking."
allowUmdGlobalAccess,"Assume UMD imports are all globally available","Allow accessing UMD globals from modules."
allowUnreachableCode,"Error when code will never be called","Do not report errors on unreachable code."
allowUnusedLabels,"Error when accidentally creating a label","Do not report errors on unused labels."
alwaysStrict,"Ensure 'use strict' is always emitted","Parse in strict mode and emit 'use strict' for each source file. Requires TypeScript version 2.1 or later."
assumeChangesOnlyAffectDirectDependencies,"A drastically faster, but occasionally inaccurate watch mode
import React from "react";
import { Link } from "react-router-dom";
export function createResource(getPromise) {
let cache = {};
let inflight = {};
let errors = {};
function load(key) {
inflight[key] = getPromise(key)
import React from "react";
import { Link } from "react-router-dom";
export function createResource(getPromise) {
let cache = {};
let inflight = {};
let errors = {};
function load(key) {
inflight[key] = getPromise(key)
@joeyfigaro
joeyfigaro / PaginationCalculator.ts
Created July 18, 2024 19:33 — forked from jimjam88/PaginationCalculator.ts
TypeScript Pagination Values Calculator
import range from "lodash.range";
type PageRangeArgs = {
size?: number,
last: number,
current: number,
}
type PageRangeReturnValue = number[];
@joeyfigaro
joeyfigaro / 194286737.json
Last active September 1, 2023 14:57
Release flags for projects
{
"source": "toggl",
"enabled": false
}
@joeyfigaro
joeyfigaro / rainbow.py
Last active November 17, 2022 15:12
Kids Python Learning
from turtle import*
pensize(15)
penup()
goto(50,70)
left(90)
@joeyfigaro
joeyfigaro / favorites.json
Created April 5, 2022 21:23
gitstumble-settings
[]
@joeyfigaro
joeyfigaro / theme.ts
Created January 6, 2022 21:38
Stitches Debugging
import { createStitches } from '@stitches/react'
export const {
theme,
styled,
css,
config,
globalCss,
createTheme,
keyframes,