Skip to content

Instantly share code, notes, and snippets.

View atayahmet's full-sized avatar
🎯
Focusing

Ahmet atayahmet

🎯
Focusing
View GitHub Profile
// https://www.typescriptlang.org/docs/handbook/advanced-types.html
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
/** Enlève les clés K de T (opposé de Pick) */
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
/** Récupère les types des arguments d'une fonction */
type ArgumentTypes<F extends Function> = F extends (...args: infer A) => any ? A : never
/** Récupère la version promisifiée d'une fonction */

Storage Class Documents

Storage class is a parent class that it can be use like orm approach. Create model class and extend to Storage parent then use it for different data stores.

Example model class:

import Storage from "./Storage";

export class FrameModel extends Storage {
@atayahmet
atayahmet / Queue.md
Last active April 6, 2018 12:03
Queue Service Docs

Queue Service

Queue servis class that we can use in offline projects.

import:

import { queueInstance } from "./app/extensions/Queue";
@atayahmet
atayahmet / rxjs_operators_by_example.md
Created September 12, 2017 10:25 — forked from btroncone/rxjs_operators_by_example.md
RxJS 5 Operators By Example
@atayahmet
atayahmet / DI.m3u
Created November 16, 2016 08:17 — forked from sim642/DI.m3u
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi

Tags Relation

## Get the product tags

Tag relation in product model:

<?php

Category Relations

category table:

id name
1 Giyim
2 Aksesuar
3 Kozmetik

Product To Product Relations

Products table:

id name
1 Kırmızı Etek
2 Mavi Etek
3 Siyah Gömlek
@atayahmet
atayahmet / product_relations.md
Last active July 17, 2016 18:48
ecommerce relations

Ürün İlişkilendirme

Yeni bir ürün eklendiğinde bu ürün için gerekli olabilecek ilgili ürünleri kullanıcıya önerme işlemi için aşağıdaki gibi bir yol izlenebilir.

  1. Ürün eklenir.
  2. Gerekli ürünler listesi oluşturulur ve sonrasında ürünler bu listeye eklenir.
  3. Oluşturulan yada var olan ilişkili ürün listesi ana ürüne tanımlanır.

Tablo/Model İlişkileri

{
createdAt: 1425994026,
gameType: 1,
sport: 1,
count: {
gameType: {
total: 25,
unique: 12
},
sport: {