Skip to content

Instantly share code, notes, and snippets.

View tarikguney's full-sized avatar
💭
Life has been an interesting ride.

Tarik Guney tarikguney

💭
Life has been an interesting ride.
View GitHub Profile
@tarikguney
tarikguney / aggregation-with-inheritance.cs
Created October 8, 2017 19:35
Aggregation with inheritance
public class Account{
private ILogin _loginInfo;
private IProfile _profileInfo;
public Account(IProfile profileInfo, ILogin loginInfo){
_loginInfo = loginInfo;
_profileInfo = profileInfo;
}
}
public class AccountChecker{
public bool Exists(Account account){
//....
}
public bool ExistsInAmazonWebServices(Account account){
//....
}
public bool ExistsInAzure(Account account){
//....
@tarikguney
tarikguney / iterator_pattern_sample.cs
Last active February 10, 2020 02:43
Iterator Pattern Sample: Collecting money from briefcase
class Program {
static void Main(){
Canta paraDoluCanta = new Canta();
var zengin = new Yazilimci(paraDoluCanta) { Isim="Tosun", Yas=21 }
// Zengin birisi olarak, farkli ozelliklerimi farkli siniflar ile temsil ediyorum.
// Mesela para sayma ozelligim: ParaSayar, saldiri ozelligim: HizliVeOfkeli, vs.
// GetIterator() genelde standard bir isim. Onun icin kullandim. Geriye Iterator ustipinden ParaSayar tipini gonderiyor.
ParaSaymaIterator paraSayanOzelligim = zengin.GetIterator();
double toplamPara = 0;
@tarikguney
tarikguney / login-form.component.css
Last active September 30, 2023 11:22
Login Form Design in Angular Material
.login-form-flex {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.button-flex-container {
display: flex;
width: 100%;
@tarikguney
tarikguney / userscript.js
Last active December 8, 2023 15:07
Eat Your Food - Netflix Interruptor
// ==UserScript==
// @name Remember to eat your food while watching Netflix
// @namespace https://www.tarikguney.com
// @version 0.1
// @description Kids watching cartoons on Netflix often forget to eat and chew their food, which drives parents crazy. You need to sit down with them and pause the video and remind them to eat their food. This script will automate that.
// @author Tarik Guney
// @match https://www.netflix.com/watch/*
// @icon https://upload.wikimedia.org/wikipedia/commons/thumb/7/75/Netflix_icon.svg/1200px-Netflix_icon.svg.png
// @grant none
// ==/UserScript==