Skip to content

Instantly share code, notes, and snippets.

View CharGrnmn's full-sized avatar

Charlie Greenman CharGrnmn

View GitHub Profile
@CharGrnmn
CharGrnmn / UFTPD-054-citable-reproducibility-review-packet.json
Created June 5, 2026 20:16
UFTPD-054 citable reproducibility review packet
{
"rung": "UFTPD-054",
"packet_id": "uftpd054_citable_reproducibility_review_packet",
"route_id": "uftpd053_citable_reproducibility_review_route",
"packet_label": "citable-reproducibility-review-packet",
"target_commit": "24c21000341f1938ded8e384070a3da925d41e92",
"baseline_workflow_run_id": 27037214864,
"release_tag": "uftpd-container-review-v1",
"release_url": "https://github.com/Unified-Field-Theory-Research/unified-field-theory-physical-promotion-dossier-from-finite-capacity-causal-networks/releases/tag/uftpd-container-review-v1",
"included_files": [
@CharGrnmn
CharGrnmn / parallel-frames.ts
Created September 29, 2025 07:39
CoF - Use Chain of Frames using text only
export const PARALLEL_FRAMES_PROMPTS = {
INTAKE: `**Role:** Gateway. **Goal:** Normalize the incoming coding problem for downstream workers.
**Do not** solve the problem. Output only the block below.
[INTAKE]
Restatement: <one-paragraph restatement>
I/O-Contracts: <input types, output type, constraints>
EdgeCases: <bullet list>
Tests (min 5): <table or list of input→expected>
PerfTarget: <big-O target & memory>
@CharGrnmn
CharGrnmn / index.html
Created July 10, 2025 07:56
Grok 4 outerspace code 3d short video x space dogfight
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Short Story Animation: Swarm of Sci-Fi Airplanes Fighting in Space (3D Version - Enhanced)</title>
<style>
body { margin: 0; background: black; }
canvas { display: block; }
</style>
@CharGrnmn
CharGrnmn / gist:19264e128fb7b41cf8e84f915f2da067
Created July 17, 2024 21:34
Atomic counter using AWS, Typescript/Node + AWS
// ATOMIC COUNTER
// no other operations can happen before or after state of the data being modified
const updateParams: DocumentClient.UpdateItemInput = {
TableName: GENERIC_TABLE,
Key: { pk: `ORG#${organizationId}`, sk: `USER#${userId}` },
ReturnValues: 'UPDATED_NEW',
UpdateExpression: 'SET #itemCounter = if_not_exists(#itemCounter, :start) + :inc, #activeItems = if_not_exists(#activeItems, :start) + :inc',
ExpressionAttributeNames: {
'#itemCounter': 'itemCounter',
'#activeItems': 'activeItems'
@CharGrnmn
CharGrnmn / scroll-into-view-directive-before.directive.ts
Last active July 12, 2024 21:00
Directive to scroll into view. Showing the before and after using input signals
import { isPlatformBrowser } from '@angular/common';
import {
Directive,
ElementRef,
Inject,
OnChanges,
PLATFORM_ID,
Renderer2,
SimpleChanges,
input,
@CharGrnmn
CharGrnmn / Makefile
Created April 21, 2024 23:49
Typescript x Node Lambda Layers - Syntax for creating a lambda layer that uses a makefile to build typescript
# file path of makefile: src/functions/shared/Makefile
build-SharedLambdaLayer:
rm -Rf node_modules
npm install
npm run build
cp -rf dist/* ${ARTIFACTS_DIR}
npm prune --production
cp -rf node_modules ${ARTIFACTS_DIR}
@CharGrnmn
CharGrnmn / server.ts
Last active April 21, 2024 03:38
server.ts for serverless-express purposes
import 'zone.js/node';
import { APIGatewayEvent, Context, APIGatewayProxyResult } from 'aws-lambda';
import { APP_BASE_HREF } from '@angular/common';
import * as express from 'express';
import { CommonEngine } from '@angular/ssr';
import { existsSync } from 'fs';
import { join } from 'path';
export const REQUEST = new InjectionToken<Request>('REQUEST');
export const RESPONSE = new InjectionToken<Response>('RESPONSE');
@CharGrnmn
CharGrnmn / track-by-property.pipe.ts
Last active January 11, 2024 18:23
Track by property for Angular. Useful for cdk-tree to allow it to use immutable data and be performance conscious
// Import the core angular services.
import { Pipe } from "@angular/core";
import { PipeTransform } from "@angular/core";
// ----------------------------------------------------------------------------------- //
// ----------------------------------------------------------------------------------- //
interface TrackByFunctionCache {
[ propertyName: string ]: <T>( index: number, item: T ) => any;
}
@CharGrnmn
CharGrnmn / large-node-modules.sh
Created February 23, 2023 14:47
find node modules that are higher than 1mb
du -sh ./node_modules/* | sort -nr | grep '\dM.*'
@CharGrnmn
CharGrnmn / rz-breakpoint scss function
Last active September 18, 2022 12:25
Razroo breakpoint scss function that we use to keep all responsive items consistent across application
```
// breakpoints to be used in conjunction with media queries across app
@function rz-breakpoint($breakpoint) {
$breakpoints: (
'extra-small': 599,
'small': 959,
'medium': 1279,
'large': 1919,
'extra-large': 5000,
);