Skip to content

Instantly share code, notes, and snippets.

View ctrlShiftBryan's full-sized avatar

Bryan Arendt ctrlShiftBryan

View GitHub Profile
@ctrlShiftBryan
ctrlShiftBryan / absynth.ex
Created November 5, 2020 12:53
elixir absinth string key map middle ware
# We are changing absithe here so that it expects maps with string keys instead
# of maps with atom keys when it resolves :user object
#
# Out of the box absinthe is optimized for using with something like ecto
# that would normally use an ecto schema (which have atom keys).
# Instead we are working with api responses and we don't need
# the overhead converting our maps to maps with atom keys.
def middleware(
middleware,
%{identifier: identifier} = field,
@ctrlShiftBryan
ctrlShiftBryan / Phoenix_Create_React_App.md
Last active August 2, 2021 02:04
Phoenix and a traditional front end.

I’m using it with a phoenix backend and a create react app front-end.

This requires building the assets and copying to the priv/static folder. Phoenix acts as a giant file server and then I also use it as an api with graphql absinthe.

Building assets

I make copying to the priv/static folder part of my asset build process package.json build script

    “build”: “rescripts build”,
    “postbuild”: “mkdirp ../priv/static && cpx \“./build/**\” \“../priv/static\” --clean && cpx \“src/styles/tailwind.css\” \“../priv/static\” “,
@ctrlShiftBryan
ctrlShiftBryan / asd
Created August 13, 2021 10:42
Created from Remix Form!
asd
@ctrlShiftBryan
ctrlShiftBryan / test
Created August 13, 2021 10:46
Created from Remix Form!
test
@ctrlShiftBryan
ctrlShiftBryan / asdasdasd
Created August 13, 2021 10:47
Created from Remix Form!
asdasdasd
@ctrlShiftBryan
ctrlShiftBryan / asd
Created August 13, 2021 10:48
Created from Remix Form!
asd
@ctrlShiftBryan
ctrlShiftBryan / test.js
Created February 16, 2022 18:04
test.js
class Game {
score(scores) {
// put your code here
}
}
describe(‘Game’, () => {
const subject = new Game();
test(‘when no special scores occur’, () => {
import { createClient, RedisClientType, RedisModules, RedisScripts } from '@node-redis/client';
import { getFromCache } from './cache.server';
describe('Name of the group', () => {
let client : RedisClientType<RedisModules, RedisScripts>;
beforeAll(async () => {
client = createClient({ url: process.env.REDIS_URL });
await client.connect();
});
@ctrlShiftBryan
ctrlShiftBryan / react-native-starters.md
Created January 4, 2024 12:37
react-native-starter

create-expo-app

create-expo-stack

create-react-native-app

create-solito-app

create-t3-turbo

@ctrlShiftBryan
ctrlShiftBryan / .roomodes.json
Created March 31, 2025 10:39 — forked from ruvnet/.roomodes.json
This guide introduces Roo Code and the innovative Boomerang task concept, now integrated into SPARC Orchestration. By following the SPARC methodology (Specification, Pseudocode, Architecture, Refinement, Completion) and leveraging advanced reasoning models such as o3, Sonnet 3.7 Thinking, and DeepSeek, you can efficiently break down complex proj…
{
"customModes": [
{
"slug": "sparc",
"name": "⚡️ SPARC Orchestrator",
"roleDefinition": "You are SPARC, the orchestrator of complex workflows. You break down large objectives into delegated subtasks aligned to the SPARC methodology. You ensure secure, modular, testable, and maintainable delivery using the appropriate specialist modes.",
"customInstructions": "Follow SPARC:\n\n1. Specification: Clarify objectives and scope. Never allow hard-coded env vars.\n2. Pseudocode: Request high-level logic with TDD anchors.\n3. Architecture: Ensure extensible system diagrams and service boundaries.\n4. Refinement: Use TDD, debugging, security, and optimization flows.\n5. Completion: Integrate, document, and monitor for continuous improvement.\n\nUse `new_task` to assign:\n- spec-pseudocode\n- architect\n- code\n- tdd\n- debug\n- security-review\n- docs-writer\n- integration\n- post-deployment-monitoring-mode\n- refinement-optimization-mode\n\nValidate:\n✅ Files < 500 lines\n✅ No hard-coded