Skip to content

Instantly share code, notes, and snippets.

View yemrekeskin's full-sized avatar
🎯
Focusing

yunus emre keskin yemrekeskin

🎯
Focusing
View GitHub Profile
@bradtraversy
bradtraversy / webdev_online_resources.md
Last active November 5, 2024 12:03
Online Resources For Web Developers (No Downloading)
using Castle.MicroKernel.Registration;
using Castle.Windsor;
using Newtonsoft.Json;
using System;
using System.Linq;
namespace functionsDemo
{
class Program
{
public class MiniProfiler : IDisposable
{
private Stopwatch _stopWatch;
private List<ProfilerEvent> _events;
public MiniProfiler()
{
_events = new List<ProfilerEvent>();
}
@tugberkugurlu
tugberkugurlu / program.cs
Last active March 19, 2020 15:32
C# Atomic File Write Sample
using System;
using System.IO;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace AtomicWriteSample
{
class Program
{
@hanula
hanula / two_letter_domains.txt
Created February 23, 2015 16:31
2 letter domains
aa.je
ae.je
ae.gg
ae.ht
af.je
af.cx
af.gg
af.gl
af.ht
ah.je
@IDisposable
IDisposable / DomainRoute.cs
Last active January 14, 2020 16:22
Domain (hostname) Routing for Asp.Net MVC and WebAPI
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Http;
using System.Web.Http.Routing;
using System.Web.Mvc;
public static class ClaimsIdentityExtensions
{
public static string GetUserEmail(this ClaimsIdentity identity)
{
Claim emailClaim = identity.Claims.FirstOrDefault(claim => claim.Type == ClaimTypes.Email);
return emailClaim != null
? emailClaim.Value
: null;
}
namespace OMR.Core.Helpers
{
using System;
using System.Collections;
using System.Collections.Generic;
public class EventAggregator
{
public IDictionary<Type, IList> Subscribers;
@matthiasg
matthiasg / docs style (bootstrap)
Created August 5, 2013 06:26
the callouts from the bootstrap documentation
/* Side notes for calling out things
-------------------------------------------------- */
/* Base styles (regardless of theme) */
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;
@yemrekeskin
yemrekeskin / StrategyDesignPatternTransfer.cs
Last active December 20, 2015 11:49
Strategy Design Pattern implementation - Payment types (Accounting and Transfer)
public interface ITransferOperation
{
bool DoAccounting();
void Transfer();
}
public class ForeignPayment
:ITransferOperation
{
public bool DoAccounting()