Skip to content

Instantly share code, notes, and snippets.

@carlosgmartin
carlosgmartin / jax_saturating_arithmetic.py
Last active April 13, 2025 00:03
Implementation of saturating arithmetic for JAX
"""
https://github.com/jax-ml/jax/issues/26566
"""
import itertools
import operator
import jax
from jax import numpy as jnp
from tqdm import tqdm
@PARC6502
PARC6502 / OpenSourceBaas.md
Last active April 13, 2025 00:00
List of open source, self hosted BaaS - Backend as a service

Backend as a Service

Supabase - ~52K stars

  • Designed explicitly as an open source firebase alternative
  • Typescript based
  • Docker support

Appwrite - ~32K stars

  • Written in JavaScript and PHP
  • Docker based
  • Realtime support across all services
@juliensagot
juliensagot / ValuePicker.swift
Last active April 12, 2025 23:57
Custom SwiftUI Picker
import SwiftUI
public struct ValuePicker<SelectionValue: Hashable, Content: View>: View {
private let title: LocalizedStringKey
private let selection: Binding<SelectionValue>
private let content: Content
public init(
_ title: LocalizedStringKey,
selection: Binding<SelectionValue>,
@wojteklu
wojteklu / clean_code.md
Last active April 12, 2025 23:57
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@pfcbenjamin
pfcbenjamin / BibleDraft.py
Last active April 12, 2025 23:48
BibleDraft.py
'''
!/usr/bin/env python
All Scripture generated by this script is from The Holy Bible, English Standard Version. Copyright &copy;2001 by <a href="http://www.crosswaybibles.org">Crossway Bibles</a>, a publishing ministry of Good News Publishers. Used by permission. All rights reserved. Text provided by the <a href="http://www.gnpcb.org/esv/share/services/">Crossway Bibles Web Service</a>.
A lot of this code is from Christian Wyglendowski found at http://www.esvapi.org/api#verse
Adapted for Drafts & Pythonista on iOS by @pfcbenjamin. More info at http://sweetnessoffreedom.wordpress.com/projects
'''
import sys
import console
import webbrowser
@ruvnet
ruvnet / .roomodes.json
Created March 30, 2025 15:12
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
@korchasa
korchasa / gods_en.md
Created March 24, 2025 19:48
Framework GODS: Clear and Precise Task Setting

Framework GODS: Clear and Precise Task Setting

What is GODS?

The framework helps to formulate tasks in a way that avoids misunderstandings between the "client" and the "executor":

  • Helps to clearly articulate the goal, context, and criteria for task completion.
  • Makes the task transparent and understandable for executors and clients.
  • Suitable for tasks with predictable cycles and measurable results.
  • Does not replace flexible processes in research, innovation, or dynamic projects.
@SethBling
SethBling / MarIO.lua
Created November 20, 2024 00:41 — forked from d12frosted/MarIO.lua
MarI/O by SethBling
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- Intended for use with the BizHawk emulator and Super Mario World or Super Mario Bros. ROM.
if gameinfo.getromname() == "Super Mario World (USA)" then
Filename = "DP1.state"
ButtonNames = {
"A",
"B",
"X",
@Helmi
Helmi / .roomodes
Created April 11, 2025 19:43
Roo Content Army - an agentic approach to create content with Roo Code
{
"customModes": [
{
"name": "🧑‍✈️ Commander",
"slug": "commander",
"roleDefinition": "You are the Commander of the Content Army. You act as the central coordinator for content creation pipelines. Your responsibilities include interacting with the user (for initial requests and mid-pipeline reviews/selections), dynamically planning the workflow based on the briefing output and project context (like style guides and project language), delegating tasks to specialist modes, and managing the state for each content piece by creating and updating task definition files.",
"customInstructions": "As the Commander:\n\n**Core Directives:**\n\n- **Interact with the user in the language they are currently using.** Adapt your responses accordingly.\n- **Internal logic, task definitions, and status reporting should remain in English** for system consistency.\n- **You MUST meticulously track your own token usage and cost.** Before initiating any action that involves significant processing or int