Skip to content

Instantly share code, notes, and snippets.

View ceaksan's full-sized avatar
🤹

Ceyhun Aksan ceaksan

🤹
View GitHub Profile

Sen, aşağıda tanımlanan "Otoriteler Kurulu" (Authorities List) tarafından yönetilen bir uygulama geliştiricisin.

KURALLAR

  1. Kişisel Görüş Yok: Bana "Bence şöyle yapabiliriz" deme. Bunun yerine "Frontend Otoritesi Alex'e göre, bu durumda React Composition pattern kullanmak best practice'tir" şeklinde konuş.
  2. Çatışma Çözümü: Eğer iki otorite çelişirse (Örn: Design vs Frontend), "Product Manager" personasının önceliklendirme kuralını uygula.
  3. Referans Göster: Öneri sunarken mutlaka ilgili otoritenin referans kaynağına (Örn: MDN Docs, Nielsen Norman) atıfta bulun.

AUTHORITIES LIST

[Buraya az önce ürettirdiğin Markdown listesini yapıştır: https://gist.github.com/ceaksan/47041a4be8437c8fa6b4b97c49430fd4]

SYSTEM INSTRUCTION

Sen, dünya standartlarında teknoloji ekipleri kuran uzman bir "Team Architect"sin. Görevin, aşağıda belirtilen proje için en uygun sanal "Danışma Kurulu"nu (Board of Authorities) oluşturmaktır.

Bu kurul, projenin geliştirilmesi sırasında her kararın "kişisel görüşe" göre değil, "sektör standartlarına (Best Practices)" göre alınmasını sağlayacaktır.

GÖREV

Aşağıdaki {PROJE_TANIMI}'nı analiz et ve bu proje için gerekli olan SaaS rollerini belirle. Her rol için spesifik bir "Otorite Personası" oluştur.

Her bir rol için şu formatı kullan:

user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
/**
* Multisite setup for subsites accessible via sub-domains.
*
* DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING!
*/
use Grav\Common\Utils;
// Get subsite name from sub-domain
$environment = isset($_SERVER['HTTP_HOST'])
/**
* Multisite setup for subsites accessible via sub-domains.
*
* DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING!
*/
use Grav\Common\Utils;
// Get subsite name from sub-domain
$environment = isset($_SERVER['HTTP_HOST'])
---
description: Shopify App Bridge – Best-practice rules for Cursor AI
globs:
- "src/**/*.{js,jsx,ts,tsx}"
alwaysApply: true
---
## 1. App Bridge & Polaris Integration
- **Single Provider**:
// Do this VERY EARLY in your <head>
(function() {
if (window.MutationObserver) {
const OriginalMutationObserver = window.MutationObserver;
let observerInstanceCount = 0;
window.MutationObserver = function(callback) {
observerInstanceCount++;
console.warn(`[DETECTOR] MutationObserver #${observerInstanceCount} created. Potential for script interference. Stack:`, new Error().stack);
@ceaksan
ceaksan / shopify-quantity-limit.md
Last active January 3, 2025 10:14
This code prevents unrealistic quantity values (e.g., thousands or millions) in GA4 reports by dynamically setting min and max limits for product quantity fields. Using Liquid, it assigns values from quantity_rule or defaults to 1 and 10, ensuring valid inputs and maintainable logic.

If you notice unusually large quantity values (e.g., thousands or millions) in item details within your GA4 reports, it might be caused by the lack of a maximum quantity limit. Visitors can manipulate this to trigger exaggerated “Add to Cart” events, distorting your analytics data. To prevent such issues, you can set minimum and maximum quantity limits in your input fields.

This implementation ensures valid input values for product quantity fields in an e-commerce environment by dynamically assigning min and max values using Liquid. The limits are derived from the product’s quantity_rule or default to 1 and 10, respectively, if no rules are defined. By using Liquid’s assign, the logic remains clean, reusable, and maintainable.

Below is an example implementation:

{% assign min_quantity = product.selected_or_first_available_variant.quantity_rule.min | default: 1 %}
{% assign max_quantity = product.selected_or_first_available_variant.quantity_rule.max | default: 10 %}

ShopifyQL Query Gist

This Gist contains a collection of ShopifyQL queries designed for in-depth analysis of sales, customer behavior, and channel performance metrics. Each query focuses on a specific aspect of e-commerce analytics, offering insights into trends and operational efficiency.

1. Daily Orders by Sales Channel (Online Store)

Description: Analyzes daily orders for the Online Store sales channel, including totals and averages for the past 7 days.

FROM sales
SHOW orders, average_order_value, shipping_charges, taxes, total_sales