Skip to content

Instantly share code, notes, and snippets.

View lostpebble's full-sized avatar

Paul Myburgh lostpebble

  • Paris <-> Cape Town
View GitHub Profile
@lostpebble
lostpebble / rearct-native-app-in-wsl2.md
Created July 22, 2024 18:20 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
import React, { createContext, useCallback, useContext, useEffect, useRef } from "react";
import { useFela } from "react-fela";
interface IFelaCache { cache: { [key: string]: string }; set: TSetCacheValue; };
type TSetCacheValue = (key: string, classes: string) => string;
const felaCacheContext = createContext<IFelaCache>({ cache: {}, set: (key, classes) => ""});
const Provider = felaCacheContext.Provider;
@lostpebble
lostpebble / pullstate-local-storage.ts
Created August 20, 2019 14:56
One way to create a local storage solution with Pullstate
import { Store } from "pullstate";
import { LocalStorage } from "@gt/gt-frontend/build/localStorage/LocalStorage";
import { get, pick, set } from "lodash";
interface IStoreWithValues<S> {
key: string;
store: Store<S>;
values?: Array<keyof S>;
deepValues?: string[];
}
@lostpebble
lostpebble / graphics.scss
Last active July 11, 2017 09:23
An example of an atomic-style SASS file, here for some colour and graphical uses
// INDIVIDUAL COLORS
$color-blue-shadow: rgb(46, 54, 64);
$color-mid-blue-shadow: rgb(88, 100, 115);
$color-light-blue-shadow: rgb(124, 139, 153);
$color-warn: rgb(255,117,25);
$color-dark-blue: #267eae;
$color-mid-blue: rgb(108, 181, 227);
$color-light-blue: rgb(89, 195, 251);
$color-lightest-blue: rgb(191, 248, 255);
$color-white-blue: rgb(238, 248, 255);