Skip to content

Instantly share code, notes, and snippets.

View jonathan-beebe's full-sized avatar

Jonathan Beebe jonathan-beebe

View GitHub Profile
@jonathan-beebe
jonathan-beebe / watermelondb_typescript_example.md
Created November 7, 2024 14:53
A WatermelonDB + TypeScript example showing typed relationships

WatermelonDB + Typescript

TLDR: Jump to Full Sample Coe to just see the final code.

I have a React + TypeScript + WatermelonDB project and want to:

  • Create a typesafe association between related models.
  • Observe a collection for changes so react components automitally re-render when items are added or removed.

I generally found WatermelonDB + TypeScript examples to be lacking, so I put together this brief example

@jonathan-beebe
jonathan-beebe / main.dart
Last active March 23, 2023 20:22
Flutter Responsive Grid Layout
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@jonathan-beebe
jonathan-beebe / main.dart
Last active March 21, 2023 20:37
DartPad Playground
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'dart:math';
void main() => runApp(
ChangeNotifierProvider(
create: (_) => ThemeProvider(),
child: const MyApp(),
),
);

YYYY-MM-DD Spike Name

Purpose: Problem statement (try to avoid solution-ing here.)

IS

  • List of things that this is.

IS NOT

@jonathan-beebe
jonathan-beebe / bpd.md
Last active February 18, 2020 13:18
Notes on Borderline Personality Disorder (BPD)

Borderline Personality Disorder (BPD)

9 Traits

  1. Fear of Abandonment
  2. Idealization & Devaluation, Unstable Relationships
  3. Unstable Identity
  4. Emotional Void, Emptiness
  5. Impulsive, Self Destructive
  6. Suicidal, Self Harm
@jonathan-beebe
jonathan-beebe / custom_json_parsing.swift
Last active June 19, 2019 16:46
Customize json parsing of a Swift Decodable
// https://gist.github.com/jonathan-beebe/a631492c6589b14d0c06fe846d266ff7
import UIKit
// The vendor sandbox returns the following values for an `undefined` string value:
//
// - `""`
// - `"None"`
// - `null`
//
using System;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
interface IRessetable
{
void Reset();
}
@jonathan-beebe
jonathan-beebe / eisenhower_matrix.md
Created March 12, 2019 14:55
Eisenhower Matrix
                       Urgent               Not Urgent
               ┌─────────────────────┬─────────────────────┐
               │                     │                     │
               │                     │                     │
     Important │      Do First       │      Do Later       │
               │                     │                     │
               │                     │                     │
               ├─────────────────────┼─────────────────────┤

│ │ │

@jonathan-beebe
jonathan-beebe / gist:34e5c0815c17c063f3c211f288fe871d
Created March 12, 2019 13:47
Software Engineering Quadrants
┌──────────────────────────┬──────────────────────────┐
Complex │┌───────────┐ │ ┌───────────┐│
││ Engineer │ │ │ Architect ││
▲ │└───────────┘ │ └───────────┘│
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
@jonathan-beebe
jonathan-beebe / git_snippets.md
Last active September 9, 2024 19:29
git snippets

Cleanup

Run this command periodically to clean loose objects and compress stuff.

git gc --aggressive

General

List all local branches sorted by last commit date, oldest last