Skip to content

Instantly share code, notes, and snippets.

View joeyfigaro's full-sized avatar
🦀
Becoming a Rustacean

Jay Figaro joeyfigaro

🦀
Becoming a Rustacean
View GitHub Profile
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 / _mixin_verticalLoop.scss
Created July 26, 2016 14:53 — forked from jathayde/_mixin_verticalLoop.scss
A SCSS loop to combine verticals (product offerings) with icons and color backgrounds.
@mixin verticalLoop($vertical) {
$vertical-image-path: "#{$image-path-content}/icons/verticals/";
@each $color in color-black, color-white, color-honeycomb, color-clementine,
color-slushie, color-frosting, color-aloe, color-berry, color-wasabi,
color-grape, color-spice, color-wine, color-whale, color-honeycombLight,
color-clementineLight, color-slushieLight, color-frostingLight,
color-teaLight, color-berryLight, color-grapeLight, color-grayLightest,
color-grayLighter, color-grayLight, color-gray, color-grayDark,
color-grayDarker, color-grayDarkest {
&.vertical-icon {