Skip to content

Instantly share code, notes, and snippets.

@mizanRahman
mizanRahman / 2026-05-28-wheel-compatibility-update-and-assign-endpoints-design.md
Created May 29, 2026 09:24
Wheel Compatibility Update and Assign Endpoints — Design Spec

Wheel Compatibility Update and Assign Endpoints

Date: 2026-05-28 Status: Design — pending implementation

Problem

Wheel compatibility today has only a create path. Once a WheelCompatibility row is written, it is immutable: there is no way to fix a mistake, no way to improve manually-entered data with later PDF-extracted data, and no way to link a car to a wheel compatibility that already exists for a different car (the typical AT flow today only works because the AT UI calls a series of GETs and an undocumented assignment step).

The immediate driver is data quality. PDF capture (DE-only) produces highly reliable data; manual capture (AT) is unreliable. When a DE user uploads a PDF whose typeApprovalNumber collides with an existing AT-manual row, today's create call rejects with DuplicateRetailAdException or hits a DB UNIQUE constraint on wheel_compatibility.type_approval_number. The DE PDF data — which is canonical — is lost.

@mizanRahman
mizanRahman / gp-analysis-KK25025.md
Created March 16, 2026 17:46
GP Analysis: Stock KK25025 - Breakdown of gross profit calculation

GP Analysis: Stock KK25025

retailAdId: 4c5099c5-9dad-47cb-9816-ae4adf77de42 Country: PL | Currency: PLN | VAT Type: 1053 | VAT Rate: 0.23 Retail Ready Date: 2025-07-07 EUR/PLN Rate: 4.2248 (derived from stored GP values)


1. GP Formula & Data Sources

@mizanRahman
mizanRahman / SecretService.java
Last active August 4, 2025 14:33
Live Coding - Dmytro Bilyk: Secret Storage
package com.conduct.interview.auto;
import io.micrometer.common.util.StringUtils;
import org.jetbrains.annotations.NotNull;
import java.util.Random;
import java.util.UUID;
public class SecretService {
private final SecretStorageDao secretStorageDao;
@mizanRahman
mizanRahman / update_version.py
Last active February 22, 2024 14:17
Automated PR creation
from github import Github
import re
import time
TOKEN = "ghp_..."
dependencies = [
["vehicle-api.version" ,"1.0.2-8177-0927ca8" ]
]
@mizanRahman
mizanRahman / burgerbot.rb
Created August 16, 2021 12:03 — forked from daxadax/burgerbot.rb
burgerbot
#!/usr/bin/env ruby
# modified from https://gist.github.com/pbock/3ab260f3862c350e6b5f #
require 'watir-webdriver'
class BurgerBot
def initialize
@attempt_count = 0
@mizanRahman
mizanRahman / 99-network-tuning.conf
Last active March 3, 2025 07:23 — forked from hrchu/99-network-tuning.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# See evil packets in your logs.
net.ipv4.conf.all.log_martians = 1
source ~/.vim_runtime/vundle_plugins
set runtimepath+=~/.vim_runtime
set number
set relativenumber
source ~/.vim_runtime/vimrcs/basic.vim
source ~/.vim_runtime/vimrcs/filetypes.vim
@mizanRahman
mizanRahman / one-liners.md
Last active September 15, 2018 21:00
one liner scripts

kill process by port. can be defined as an alias

lsof -i :8080 | awk '{l=$2} END {print l}' | xargs kill

Output an arbitrary number of open TCP or UDP ports in an arbitrary range

comm -23 <(seq "$FROM" "$TO") <(ss -tan | awk '{print $4}' | cut -d':' -f2 | grep "[0-9]\{1,5\}" | sort | uniq) | shuf | head -n "$HOWMANY"
package com.example.kpcat;
import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
public class UniqueRandomNumberGeneratorImplV2 implements UniqueRandomNumberGenerator {
private SecureRandom random;
@Autowired
public UniqueRandomNumberGeneratorImplV2(SecureRandom random) {
this.random = random;
}
@Override