Skip to content

Instantly share code, notes, and snippets.

View Vadi's full-sized avatar
🎯
Looking for clear sky

Vadi Kumar Vadi

🎯
Looking for clear sky
View GitHub Profile
@Vadi
Vadi / async-worker-env-vars.md
Created April 5, 2026 15:57
Do I need to set ASYNC_WORKERS / ASYNC_VIP_CAP / ASYNC_STANDARD_CAP / BATCH_WORKERS?

Do I need to set ASYNC_WORKERS / ASYNC_VIP_CAP / ASYNC_STANDARD_CAP / BATCH_WORKERS?

No. All four have defaults baked into cmd/server/main.go. Safe to skip for the launch.

The defaults

  • ASYNC_WORKERS=2 - goroutines per pod pulling jobs off the queue
  • ASYNC_STANDARD_CAP=4 - max in-flight PDFs a non-VIP carrier can have at once
  • ASYNC_VIP_CAP=12 - same, but for VIP carriers
  • BATCH_WORKERS=8 - workers for the sync batch endpoint (legacy, not used by the UI)
@Vadi
Vadi / support-guide-pdf-quota.md
Created April 4, 2026 13:24
Support Guide: PDF Quota & Billing — How It Works

Support Guide: PDF Quota & Billing

How Plans Work

We offer two plans:

Plan How Many PDFs? Resets? Overage?
Free 10 PDFs total (lifetime) Never — once used, they're gone Not available — must upgrade
Basic 50 PDFs per month Resets each billing cycle Yes — extra PDFs charged per-file
@Vadi
Vadi / qa-quota-billing.md
Created April 4, 2026 13:22
QA Guide: PDF Quota & Usage Billing

QA Guide: PDF Quota & Usage Billing

Overview

Every PDF uploaded to the platform counts toward the carrier's quota. The system charges at upload time, then may refund after processing if the file didn't consume expensive resources. This document covers when quota is charged, when it is refunded, and how to verify each scenario.


Plans & Limits

Overage Billing – How It Works & How to Test It

How Overage Works (The Short Version)

Think of it like your phone bill — you don't get charged for extra minutes the second you go over. The overage charge shows up on your next bill.

  • During the month: Every time a carrier uploads PDFs, we keep a running count in our own database. If they go over their plan limit, we let them keep uploading (up to a max), but we're just keeping score internally.
  • At the end of the billing cycle: When Stripe goes to generate their next invoice, it pings us saying "hey, I'm finalizing this invoice." That's when we look at how many PDFs they used, subtract their plan limit, and tell Stripe "this carrier went over by X files — add that to the bill."

The overage line item only appears on the invoice at the end of the billing period, not in real time.

@Vadi
Vadi / vpn_using_cli.md
Created May 14, 2025 16:45
Connecting to VPN using CLI

Installation

Mac

brew install openfortivpn

Ubuntu

<!DOCTYPE html>
<html>
<head>
<meta name="description" content="dadasd">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id='container'></div>
<script id="jsbin-javascript">
variableTasks.uiSettings.result = {
settings: [
{
name: "askAddress",
icon: "",
label: "Ask Address",
order: 1
},
{
name: "chooseAddress",
@Vadi
Vadi / TestMs.conf
Created December 28, 2016 17:02
Quick to test to see MS is accessible
modelInfo.name = "TestMs"
userTasks.getAddress {
expectInputs {
address {
type = "string"
}
}
}
@Vadi
Vadi / GroupingApproach.java
Created May 10, 2014 12:43
Shows how to implement grouping queries in Lucene
package com.exzeo.spock;
import junit.framework.TestCase;
import org.apache.commons.io.FileUtils;
import org.apache.lucene.analysis.core.SimpleAnalyzer;
import org.apache.lucene.document.*;
import org.apache.lucene.index.*;
import org.apache.lucene.search.*;
import org.apache.lucene.search.grouping.GroupDocs;
import org.apache.lucene.search.grouping.GroupingSearch;