Skip to content

Instantly share code, notes, and snippets.

View JFrankfurt's full-sized avatar
💰
🔥

Jordan Frankfurt JFrankfurt

💰
🔥
View GitHub Profile
@JFrankfurt
JFrankfurt / hook.ts
Created November 3, 2022 19:24
dumb relay data fetching hook
import { fetchQuery, useRelayEnvironment } from 'react-relay'
import { useEffect, useState } from 'react'
interface ArgsInterface {
numResults: number
pollingInterval: number
}
export function useSomeRelayQuery({ numResults, pollingInterval }: ArgsInterface): {
data: SomeTypeQuery$data | null

0x127bf6921270d9b79392502210e5210c952318d237006dae1ea019210d0e77ab

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@JFrankfurt
JFrankfurt / debounceInput.tsx
Created March 1, 2019 19:54
Use an RXjs Subject to debounce text input
import { Subject } from 'rxjs'
import { debounceTime } from 'rxjs/operators'
const simpleTextFilter = filterString => (object = {}) => {
return typeof filterString === 'string'
? Object.values(object)
.toString()
.toLowerCase()
.includes(filterString.toLowerCase())
: false
@JFrankfurt
JFrankfurt / validityCheck.ts
Created February 1, 2019 15:29
sudoku validation
function rowValidity(row: number[]): boolean {
const numSet = new Set(row);
const deDupedRow = Array.from(numSet);
const allNumsInValidRange = deDupedRow.reduce((acc, cur) => {
if (cur < 1 || cur > 9 || acc === false) {
return false;
} else {
return true;
}
}, true);
version: '2'
services:
app:
build:
context: ./
dockerfile: server/Dockerfile
restart: always
ports:
- "8080:8080"
volumes:
@JFrankfurt
JFrankfurt / keybase.md
Created February 15, 2017 20:37
keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@JFrankfurt
JFrankfurt / verifying
Created May 10, 2016 16:22
Verifying that +jordanfrankfurt is my blockchain ID. https://onename.com/jordanfrankfurt
Verifying that +jordanfrankfurt is my blockchain ID. https://onename.com/jordanfrankfurt
Verifying that +jfrankfurt is my openname (Bitcoin username). https://onename.com/jfrankfurt