Skip to content

Instantly share code, notes, and snippets.

View CiprianSpiridon's full-sized avatar

Ciprian Spiridon CiprianSpiridon

View GitHub Profile
#!/bin/bash
# -----------------------------
# ✅ QDRANT INSTALL
# -----------------------------
echo "Installing Qdrant..."
cd /tmp
curl -O https://releases.qdrant.tech/qdrant-x86_64-unknown-linux-gnu.tar.gz
tar -xzf qdrant-x86_64-unknown-linux-gnu.tar.gz
@CiprianSpiridon
CiprianSpiridon / cart-simply-explained.md
Last active June 3, 2025 07:18
cart-simply-explained

Mumzworld Shopping Cart - How It Works

Overview

This document explains how the Mumzworld shopping cart works from a customer's perspective, including all the steps, processes, and business rules that make online shopping possible.

What is a Shopping Cart?

Think of the online shopping cart just like a physical shopping cart in a store:

  • Customers browse products and add items they want to buy
  • They can see what's in their cart and change quantities
@CiprianSpiridon
CiprianSpiridon / delivery-promise-explained-simply.md
Created June 3, 2025 06:46
delivery-promise-explained-simply

How Mumzworld's Delivery Promise Service Works

A Business Guide for Non-Technical Stakeholders


🎯 What Is The Delivery Promise Service?

Imagine a customer visits Mumzworld's website, adds a baby stroller to their cart, and wonders: "When will this arrive at my door?"

Our Delivery Promise Service is like a smart assistant that instantly answers this question by:

@CiprianSpiridon
CiprianSpiridon / price-matching-explained-simply.md
Last active June 3, 2025 05:57
price-matching-explained-simply

Mumzworld Price Matching System - Explained Simply

A non-technical guide to understanding how our automated price matching works


🎯 What Does This System Do?

Imagine you're running a store and want to make sure your prices are competitive with other stores in the mall. Instead of manually checking every competitor's price every day, you hire a team of assistants to:

Mumzworld Price Matching Service v2

A sophisticated Laravel 12 API service that automatically monitors competitor prices and applies intelligent price matching rules for Mumzworld's e-commerce platform across UAE and KSA markets.

🚀 Quick Start

Prerequisites

  • Docker & Docker Compose
  • Git
// Recalculating BigQuery costs with adjusted ratios for Silver and Gold layers
// Using industry high-end ratios instead of the conservative ratios
// BigQuery pricing constants
const STORAGE_PRICE_PER_TB = 20; // $20 per TB per month for active storage
const STORAGE_PRICE_PER_GB = STORAGE_PRICE_PER_TB / 1024; // ~$0.0195 per GB
const COMPUTE_PRICE_PER_TB = 5; // $5 per TB for on-demand queries
const COMPUTE_PRICE_PER_GB = COMPUTE_PRICE_PER_TB / 1024; // ~$0.0049 per GB
// Original layer sizes from input
@CiprianSpiridon
CiprianSpiridon / cv-anonymous-gpt.js
Created June 1, 2024 10:19
Strapi Service to send data to OpenAI Assistant v2
"use strict";
const {OpenAI} = require("openai");
const openai = new OpenAI({
apiKey: process.env.OPENAI,
});
//openai assistant ID to make sure we only use 1 assistant - limits costs
const assistantId = process.env.OPENAI_ASSISTANT_ID;
//assistant instructions
const assistantInstructions = process.env.OPENAI_ASSISTANT_INSTRUCTIONS
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@CiprianSpiridon
CiprianSpiridon / laravel-framework-files-permissions-security.md
Created April 27, 2017 15:09
laravel freamework file permissions - Security

set all files to 644

sudo find /path/to/your/code -type f -exec chmod 644 {} ;

make all folders 755

sudo find code -type d -exec chmod 755 {} ;

make sorage and cache writable

sudo chmod -R ug+rwx storage bootstrap/cache

@CiprianSpiridon
CiprianSpiridon / default.conf
Created April 24, 2017 12:16
Redirect all HTTP requests to HTTPS with Nginx
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}