Skip to content

Instantly share code, notes, and snippets.

View btotharye's full-sized avatar

Brian btotharye

View GitHub Profile
@acorn1010
acorn1010 / createGlobalStore.ts
Last active October 5, 2024 21:56
Easier Zustand store
import {SetStateAction, useCallback} from 'react';
import {create} from "zustand";
export type EqualityFn<T> = (left: T | null | undefined, right: T | null | undefined) => boolean;
export type StoreType<State> = {
use<K extends keyof State>(
key: K,
defaultValue?: State[K],
equalityFn?: EqualityFn<State[K]>,
@Ophirr33
Ophirr33 / demo.scala
Last active August 28, 2019 09:47
Low level vs high level fargate stacks
// =================================================================
// | High level vs Low level "App stacks" |
// =================================================================
//
// This works, but it creates too many resources (security groups, ingress/egress rules) and can't
// be deployed in the locked down environment I work with. Additionally, I would like to pass in
// a log group.
class HighLevelStack(
parent: Construct,
@xavriley
xavriley / README.md
Last active December 30, 2023 12:17
Original NES Mario Theme for Sonic Pi

Making Chiptune Music using Sonic Pi v2.0

Warning: this might not work on a RaspberryPi yet

I was curious about making retro gaming sounds using Sonic Pi. A couple of months and a lot of Googling later, here's the original Mario Bros theme as it was heard on the NES console.

I'm (just about) old enough to remember rushing home from school to play this game at Philip Boucher's house, sitting cross-legged in front of the TV till my feet got pins and needles. Working out how to recreate it for Sonic Pi was a lot of fun!

Getting the sounds of the NES chip