Skip to content

Instantly share code, notes, and snippets.

View apotema's full-sized avatar

Alexandre Mondaini Calvão apotema

View GitHub Profile
@apotema
apotema / rfc-349-summary.md
Created April 24, 2026 16:36
RFC #349 — Mass price updates · non-technical client summary

Mass Price Updates — Summary for the Client

What is this?

A new feature that lets an administrator update many prices at once by defining a subset (e.g., all Vietnam fabric products) and a formula (e.g., increase by 5%), preview the result, and apply it in a single action — with an easy undo.

Today this kind of change is manual: prices are edited one at a time, or worked around in a separate spreadsheet and re-imported. Annual price increases, factory-wide adjustments, and reactive changes (like tariff shifts) all live in that manual workflow.

How the user will experience it

@apotema
apotema / rfc-349-interactive.html
Last active April 24, 2026 15:28
RFC #349 — Mass formula updates · interactive prototype (Direction A modal)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>RFC #349 — Mass Formula Updates · Prototype</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- Pull the actual compiled stylesheet from manwah-development so the
prototype matches the live app exactly. Fingerprint pins to a
specific deploy; regenerate if assets change. -->
<link rel="stylesheet" href="https://manwah-development-347fcf73ac86.herokuapp.com/assets/application-ca2e3da3adfa8c9f708138ae51f034a16a24f5872db68607a923b4da7f9954de.css">
@apotema
apotema / zig-0.15.2-macos-tahoe-fix.md
Created April 9, 2026 21:01
Zig 0.15.2 + macOS 26 Tahoe: DEVELOPER_DIR fix for arm64 linker errors

Zig 0.15.2 + macOS 26 (Tahoe): DEVELOPER_DIR fix for arm64 linker errors

TL;DR

export DEVELOPER_DIR=/Library/Developer/CommandLineTools

Add that to ~/.zshrc (or ~/.bashrc). Every zig build, zig build run, zig build test, and any tool that wraps them (e.g. labelle) will start working again.

@apotema
apotema / gist_content.md
Last active January 1, 2026 14:37
Architecture discussion: Simplifying labelle-tasks integration with labelle-engine

Simplifying labelle-tasks Integration with labelle-engine

Current Architecture Pain Points

1. Component Wrapper Boilerplate

Currently, bakery-game has component files that just wrap task engine calls:

// bakery-game/components/storage.zig
pub const Storage = struct {
{"label":"coverage","message":"86%","schemaVersion":1,"color":"hsl(103, 100%, 40%)"}

Fellow Procorians,

I have spent most of my time with you working on the QuickBooks microservice and on a microservice to host the current HH2 Sage integration code.

I have seen some points of improvement on the Sage integration, one in particular is related to repeated code used to access HH2. For example:

commitment_change_order_conversation.rb

def flush_hh2_cco_queue(origin_id)
  retry_cntr ||= 1
Fellow Procorians,
I have spent part of my time working on the Quickbooks and on the HH2 system.
I have seen some points of improvement on the SAGE integration, one of them is related to repeated
code to access to the HH2 system. All along the code we can see this code to access the Hh2 systemm.
commitment_change_order_conversation.rb
```ruby
def flush_hh2_cco_queue(origin_id)
@apotema
apotema / include
Last active August 29, 2015 14:07
module Qbwc
module OrderedFields
module ClassMethods
def field attribute_name
@attr_order ||= []
@attr_order << attribute_name
attr_accessor attribute_name
end
def attr_order
@apotema
apotema / data_load.rb
Created November 24, 2012 19:49
Data load
require 'rubygems'
require 'sequel'
DB_MY = Sequel.connect('mysql://root@localhost/wikimapas_legacy')
DB_PG = Sequel.connect('postgres://alexandre@localhost/wikimaps_development')
categories_mysql = DB_MY[:categories].select{[id, name, created_at, updated_at]}
categories_ids = {}
categories_mysql.each do |category|
# my => pg