Skip to content

Instantly share code, notes, and snippets.

View umairnadeem's full-sized avatar
🎯
Focusing

Umair Nadeem umairnadeem

🎯
Focusing
View GitHub Profile
@umairnadeem
umairnadeem / index.ts
Created October 17, 2025 02:53
Cartesia bug
import fetch from "node-fetch";
const dialogs: [string, number[]][] = [
["We march Edmund down the corridor, our steps hollow on the tiles, and the study still smells faintly of lavender and coal.", new Array(256).fill(0)], // note replace with actual embedding
["This is theater. You will find a mark that proves nothing and lose the courier who could clear you.", new Array(256).fill(0)],
["I kneel, slide the rug, and align the brass key’s crescent nick to the tiny M-shaped indent by the floorboard seam, and the plank shifts with a tight click that matches the desk’s hidden latch sound.", new Array(256).fill(0)],
["If that proves alignment, we log it now and reseal Lot 14 in the blue salon, Inspector. My seal, my ledger, your photograph, and Edmund keeps his hands where I can see them.", new Array(256).fill(0)],
["A faint graphite half-loop near the indent matches the smudge on Lot 14’s page, though a stray linen fiber like Captain Pierce’s glove lies beside it, and from the drive the courier’s whe
@umairnadeem
umairnadeem / serverless.yml
Created December 1, 2020 01:27
Different concurrencies per fn
custom:
fnConcurrency:
staging: 10
prod: 300
functions:
exampleFn:
handler: src/functions/queue/QueueLambda.handle
reservedConcurrency: ${self:custom.fnConcurrency.${self:custom.currentStage}}
...
select sku.ORGSKU as dsku,
wi.LOCATION as location,
p.MSKU as sku,
delta,
reason,
notes,
wim.CREATED
from inventory.WAREHOUSEINVENTORYMOVEMENT wim
join INVENTORY.STOCKKEEPINGUNIT sku on sku.id = wim.STOCKKEEPINGUNITID
join INVENTORY.WAREHOUSE w on w.ID = wim.WAREHOUSEID
begin;
delete from ProductAlias p where dsku in ('D9T9EJNCJ6I',
'D9MJWKRFDIO',
'D2Q2Y142V4E',
'DEH5TXVYC0E',
'DUCYTBPWZYR',
'DEME141KDUO',
'DTIZZHFN0I4',
'D2BMNWFG65T',
'D3KDGCIKX0C',
-- Archive the newly imported products (they don't have barcodes)
BEGIN ;
UPDATE Product p
INNER JOIN
(SELECT p.dsku
FROM Product p
JOIN
(SELECT channelProductId
FROM ProductLog p
Proxy (GET) 54.162.24.163/api/%{*:8999999-9999999}/reservations
RPS (Clients) | Latency | Error %
10 | 37 ms | 0
100 | 40 ms | 0
500 | 39 ms | 0
1000 | 103 ms | 0.05%
2000 | 223 ms | 1.3%
3000 | 567 ms | 19.43%
Proxy (POST) 54.162.24.163/api/reservations
Proxy (GET) 54.162.24.163:3000/api/%{*:8999999-9999999}/reservations
RPS (Clients) | Latency | Error %
10 | 6 ms | 0
100 | 6 ms | 0
500 | 84 ms | 0
1000 | 3199 ms | 0
Proxy (POST) 3.80.210.255:3000/api/reservations
RPS (Clients) | Latency | Error %
10 | 13 ms | 0
# let serverOne = 'http://localhost:3001';
upstream api_reservations {
server 127.0.0.1:3001;
}
# let serverTwo = 'http://localhost:3002';
upstream api_photos {
server 127.0.0.1:3002;
}
upstream api_reservations {
server 127.0.0.1:3001;
}
upstream api_photos {
server 127.0.0.1:3002;
}
server {
listen 80;
server {
listen 80;
root /usr/local/var/www/html/proxy;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}