Skip to content

Instantly share code, notes, and snippets.

View jrnxf's full-sized avatar
🌱

Colby Thomas jrnxf

🌱
View GitHub Profile
@jrnxf
jrnxf / gh-emoji-shortcodes.json
Last active May 15, 2022 17:34
gh emoji shortcodes
{
":grinning:": "😀",
":smiley:": "😃",
":smile:": "😄",
":grin:": "😁",
":laughing:": "😆",
":satisfied:": "😆",
":sweat_smile:": "😅",
":rofl:": "🤣",
":joy:": "😂",
@jrnxf
jrnxf / RowLimitTags.tsx
Created March 25, 2022 07:52
RowLimitTags.tsx
import { Box } from "@mantine/core";
import { useCallback, useEffect, useRef, useState } from "react";
const tags = [
"Singing",
"Music Production",
"Piano",
"Baking",
"Art",
"Dancing",
@jrnxf
jrnxf / main.rs
Last active March 20, 2022 21:47
timr
use clap::Parser;
use std::{error::Error, io, sync::mpsc, thread, time::Duration};
use termion::{
event::Key,
input::{MouseTerminal, TermRead},
raw::IntoRawMode,
screen::AlternateScreen,
};
use tui::{
backend::{Backend, TermionBackend},
@jrnxf
jrnxf / Grid.tsx
Created March 27, 2021 19:07
react-stack-grid overlapping fix
import React, { useEffect, useRef } from 'react'
import { useWindowSize } from '@react-hook/window-size'
import StackGrid from 'react-stack-grid'
export const Grid = ({ children }) => {
const ANIMATION_DURATION = 400
const [windowWidth] = useWindowSize()
const grid = useRef(null)
const resizeGrid = () => {
if (grid.current) {

I'm writing an application that contains an overall data model with some obvious relations. I started writing the application using MongoDB (what I'm familiar with), but decided to try and transition over to Postgres since again, my data has tons of foreign keys. For simplicity, let's consider the following models:

class GameBase {
  id: string
  entryIds: string[]
  submissionIds: string[]
}