Skip to content

Instantly share code, notes, and snippets.

View yemrekeskin's full-sized avatar
🎯
Focusing

yunus emre keskin yemrekeskin

🎯
Focusing
View GitHub Profile
@ahmetb
ahmetb / domains
Created August 26, 2012 15:48
List of gov.tr domain names I discovered (bulabildigim kadariyla bir gov.tr alan adlari listesi)
3158 GOV.TR domain names
http://ahmetalpbalkan.com/blog/gov-tr-alan-adlari-listesi/
==================================
100yilyy.gov.tr
19mayis.gov.tr
28kontrollab.gov.tr
360sakarya.gov.tr
80yilrehabilitasyon.gov.tr
9fi.gov.tr
@RyannosaurusRex
RyannosaurusRex / RouteConfig.cs
Last active January 19, 2018 02:18
ASP.NET MVC Subdomain Routing
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Sub", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "SubdomainController", action = "AnyActionYouLike", id = UrlParameter.Optional },
@yemrekeskin
yemrekeskin / StrategyDesignPattern.cs
Last active December 20, 2015 11:49
Strategy Design Pattern implementation - Salary and Permit Scenarios
public interface ISalaryCalc
{
decimal GetSalary();
}
public class EngineerSalaryCalc
:ISalaryCalc
{
public decimal GetSalary()
{
@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()
@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;
namespace OMR.Core.Helpers
{
using System;
using System.Collections;
using System.Collections.Generic;
public class EventAggregator
{
public IDictionary<Type, IList> Subscribers;
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;
}
@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;
@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
@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
{