Skip to content

Instantly share code, notes, and snippets.

Avatar

Jamon Holmgren jamonholmgren

View GitHub Profile
@jamonholmgren
jamonholmgren / minecraft-child-account.md
Last active August 21, 2023 01:25
Minecraft, fixing the "Multiplayer is disabled. Please check your Microsoft account settings." frustrating issue
View minecraft-child-account.md

I have a Microsoft Family account and have my daughter as one of the family members.

Whenever she tries to play Minecraft (Java Edition) with us, it pops up something like the following:

"Multiplayer is disabled. Please check your Microsoft account settings."

I tried all kinds of things found online. They kept saying to go to the Xbox Privacy and online safety screen, but I couldn't find the "You can play with people outside of Xbox Live" and "You can join multiplayer games" settings. Well, that's because I needed to click on the "Xbox Series ... and Windows 10 devices Online Safety" tab.

Here's a direct link. You will need to replace the "GAMERTAGHERE" with your child's gamer tag. You need to be logged in under your (parental) account, not the child's.

@jamonholmgren
jamonholmgren / ChainReactPrivacyPolicy.md
Created May 1, 2023 20:09
Privacy Policy for the Chain React App by Infinite Red, Inc.
View ChainReactPrivacyPolicy.md
View Redux-vs-MobX-rerenders.md

Q. Under what conditions is MobX-state-tree optimized to memoize/prevent accidental re-renders that Immutable libraries that create copies like Redux/RTK are more prone to?

MST (and really it’s MobX under the hood doing this) doesn’t even really diff at all; instead, it observes changes to objects via JS proxies. It also tracks what properties are accessed on observed objects via JS proxies.

So, let’s say you have an object like this, that is an observed MobX object (we’ll ignore MST, since it’s the same for both):

const user = makeAutoObservable({
  name: "Jamon",
  age: 41,
View mobx-lightning-concept.md

This was a late-night forey into trying to improve on MobX-State-Tree's ergonomics and implementation.

MST is pretty good.

type MSTActions = {
    [key: string]: Function
}

type MSTViews = {
View freelancer-promotional-advice.md

Advice to freelance React Native developers from Jamon

On-stream, February 28, 2022 (https://youtube.infinite.red)

• Network

  • Get to know as many other React Native developers as you can
  • Other developers are a great source of recommendations to potential clients • Let them know that you are available for work, and how much time you have, and what time period
  • But don't be annoying
  • "Hey Bob, hope things are good! Just letting you know I have availability starting March for 32 hours a week if you hear of anyone looking for a React Native freelancer. Really appreciate any referrals."
View index-final.ts
import { Maze } from "./maze";
const state = {
x: 1,
y: 1,
destX: 1,
destY: 1,
path: []
};
View index.ts
import { Maze } from "./maze";
const state = {
x: 1,
y: 1,
destX: 1,
destY: 1,
path: [[1, 2], [2, 2], [3, 2], [3, 1], [4, 1], [5, 1], [5, 2]]
};
View index.ts
import { Maze } from "./maze";
const state = {
x: 1,
y: 1,
destX: 1,
destY: 1,
path: [[1, 2], [2, 2], [3, 2], [3, 1], [4, 1], [5, 1], [5, 2]]
};
View retrace.ts
// did we find the destination?
if (lowestCostNode.x === state.destX && lowestCostNode.y === state.destY) {
// retrace our steps back to the beginning!
function retrace(node, path) {
// did we find the origin? if so, we're done!
if (node.previous === undefined) return [node, ...path]
// not yet ... let's keep retracing our steps
return retrace(node.previous, [ node, ...path ])
}
// kick off the retracing!
View explore-nodes.ts
function exploreNodes(nodes, exploredNodes) {
if (nodes.length === 0) return
// sort nodes by cost
nodes.sort((a, b) => a.cost < b.cost ? -1 : 0)
// remove the lowest cost node from the list
const lowestCostNode = nodes.shift()
// add it to the explored nodes