Skip to content

Instantly share code, notes, and snippets.

View JamieMason's full-sized avatar

Jamie Mason JamieMason

View GitHub Profile
@3thr33s
3thr33s / effect-first-development.md
Created March 16, 2026 22:41
original is here: https://github.com/kriegcloud/beep-effect/blob/main/standards/effect-first-development.md — changes made were to strip the guidance of any `beep-effect`-specific helper library references

Effect-First Development

This document defines the working model behind Effect-first code in this repository.

Definition

Effect-first development means domain code is written in Effect-native constructs first, and native JavaScript/TypeScript patterns only at explicit boundaries.

The goal is to make failure, absence, decoding, and dependency wiring explicit and typed.

Primary References

@belgattitude
belgattitude / ci-yarn-install.md
Last active October 14, 2025 07:43
Composite github action to improve CI time with yarn 3+ / node-modules linker.
const BASE83_ALPHABET = `0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~`;
const BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const BMP_HEADER = `data:image/bmp;base64,Qk3mAQAAAAAAADYAAAAoAAAADAAAAPT///8BABgAAAAAALABAAAAAAAAAAAAAAAAAAAAAAAA`;
const sRGBToLinear = (value: number) => {
const v = value / 255;
if (v <= 0.04045) {
return v / 12.92;
} else {
return Math.pow((v + 0.055) / 1.055, 2.4);
@adamkl
adamkl / AppContextProvider.tsx
Created February 10, 2020 22:20
xState service layer
import React from "react";
import { createUserSessionService } from "services/UserSessionService";
import { createNavService } from "services/NavService";
// Wiring up our "IOC container"
const userSessionService = createUserSessionService();
// NavService depends on UserSessionService
const navService = createNavService(userSessionService);
@jimmychu0807
jimmychu0807 / string-conversion.rs
Created November 21, 2019 10:20
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
@mikaello
mikaello / group-objects-by-property.md
Last active October 26, 2025 18:51 — forked from JamieMason/group-objects-by-property.md
Group Array of JavaScript Objects by Key or Property Value

Group array of JavaScript objects by keys

This fork of JamieMason's implementation changes the key parameter to be an array of keys instead of just a single key. This makes it possible to group by multiple properties instead of just one.

Implementation

const groupBy = keys => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = keys.map(key => obj[key]).join('-');
@EvanBacon
EvanBacon / apple-touch-startup-image.html
Created April 17, 2019 07:10
An example of full iOS PWA startup image (splash screen) support.
<html>
<head>
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-title" content="Expo" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link
rel="apple-touch-icon"
sizes="180x180"
@iarna
iarna / package-lock.json
Last active November 6, 2017 12:29
shrinkpack bug
{
"name": "x",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"whatwg-fetch": {
"version": "2.0.3",
"resolved": "file:whatwg-fetch-2.0.3.tar",
"integrity": "sha512-RFZv5NwmYdZP+xIWp6SZkF0kiBe6oG05+mlWRZNi+lTMM99NByWEtXoTjR8SLNS3FVJ0iy0Y3h44skNHlVvY4w=="
@siddharthkp
siddharthkp / reactivconf-2017-proposal.md
Last active February 25, 2024 10:06
Building applications for the next billion users
@abiodun0
abiodun0 / contramap-functor.js
Last active August 13, 2021 21:11
Contramap and functors in js. react as an example
import React from 'react'
// Comp:: a -> JSX;
const Comp = g => ({
fold: g,
contramap: f => Comp(x => g(f(x))),
concat: other => Comp((x) => <div> {g(x)} {other.fold(x)} </div>)
});
// Reducer :: (a, b) -> a