Skip to content

Instantly share code, notes, and snippets.

View dijonkitchen's full-sized avatar
👨‍👩‍👧‍👦
purposely playing with partners

JC (Jonathan Chen) dijonkitchen

👨‍👩‍👧‍👦
purposely playing with partners
  • Long-term Compounding Partners
  • Lenapehoking Schelling Point
  • LinkedIn in/jonathanschen
View GitHub Profile
@dijonkitchen
dijonkitchen / DR-YYYY-MM-DD-title.md
Last active January 31, 2024 14:53
Docs: Decision Record Template

Decision Record YYYY-MM-DD: Title

Status timeline

YYYY-MM-DD: Proposed by stakeholder(s)...

YYYY-MM-DD: Rejected by stakeholder(s)...

YYYY-MM-DD: Accepted by stakeholder(s)...

graph TB
    HE[Hip escape] --> OG
    EE[Elbow escape] --> OG
    SC --> EE
    SC --> HE
    BG[Butterfly guard] --> S
    BG --> CSB
    S[Standing] --> OG[Open guard]
    S --> RP[Russian]
flowchart TD
    Investors(Investor LPs, LLC) --> |Capital| Fund1
    Investors --> Fund2

    Fund1(Fund I, LP) --> |Buys| Co1(C Corp 1)
    Co1 --> |FCF| Fund1
    
    Fund1 --> Co2(C Corp 2)
 Co2 --> Fund1
/**
* @param {number} capacity
*/
var LRUCache = function(capacity) {
this.capacity = capacity
this.cache = []
this.dictionary = {}
};
/**
// Inputs: List of names
// Outputs: Groups of size 3-5, randomized
// Pseudocode:
// Take array of names
// Shuffle this array
// Split into groups
// Check if length is less than 3
// Return randomized list
// Split shuffled array into groups of 3-5
@dijonkitchen
dijonkitchen / nearestPoints.js
Last active February 16, 2018 16:43
Calculate nearest points
const distance = (point1, point2) => {
return Math.sqrt(Math.pow(point2[0] - point1[0], 2) + Math.pow(point2[1] - point1[1],2))
}
const nearestPoints = (basePoint, pointList, numberOfNearestWanted) => {
const pointDistances = pointList.map(point => {
return {
point,
distance: distance(basePoint, point)
}
@dijonkitchen
dijonkitchen / phase-1-checkpoint.rb
Created November 17, 2015 15:55
Phase-1-Checkpoint
# User story:
# Use a built-in ruby structure for pets (name, type)
# Harry is a dog,
# Rufus is a cat,
# Jane is a chimp,
# Sally is a snake,
# Ernie is a chimp,
# Melvin is a hamster
pets = {"Harry"=>"dog",