Skip to content

Instantly share code, notes, and snippets.

View yemrekeskin's full-sized avatar
🎯
Focusing

yunus emre keskin yemrekeskin

🎯
Focusing
View GitHub Profile
@yemrekeskin
yemrekeskin / CronLog.cs
Created July 21, 2014 07:21
override Equals
public class CronLog
:BaseModel
{
public int ProcessId { get; set; }
public string ProcessName { get; set; }
public DateTime RequestTime { get; set; }
public DateTime ActualRequestTime { get; set; }
public DateTime ResponseTime { get; set; }
@yemrekeskin
yemrekeskin / FetchGmailContacts.cs
Created June 23, 2014 05:53
Retrieving all google contacts using c#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Google.Contacts;
using Google.GData.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;
@yemrekeskin
yemrekeskin / EmbeddedStringResources.cs
Created June 12, 2014 12:24
Resource file manager in assembly
public static class EmbeddedStringResources
{
static Dictionary<string, string> stringResources = new Dictionary<string, string>();
public static string LoadResource(string name)
{
// Tüm resource .dll içinde olmalı (GetExecutingAssembly())
Assembly assembly = Assembly.GetExecutingAssembly();
string resourceName = assembly.GetName().Name + ".Resources." + name;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using ServiceStack;
using ServiceStack.Configuration;
using ServiceStack.Redis;
using ServiceStack.Text;
namespace GithubApi
@yemrekeskin
yemrekeskin / Simple.WebCrawler.cs
Created May 15, 2014 07:41
SimpleWebCrawler with 2 node deep - console app
class Program
{
static void Main(string[] args)
{
LinkCrawler crawler = new LinkCrawler();
List<string> list = crawler.Catch("http://blog.yemrekeskin.com/en/");
foreach (var item in list)
{
Console.WriteLine(item);
public interface ILogger
{
void Write(Exception ex);
void Write(string logText);
}
public abstract class BaseLogger
: ILogger
{
public static string logFilePath = string.Empty;
GO
/****** Object: StoredProcedure [dbo].[INSERT] Script Date: ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--drop proc [dbo].[INSERT]
CREATE procedure [dbo].[INSERT]
(
DECLARE @text1 VARCHAR(MAX),
@text2 VARCHAR(MAX),
@text3 VARCHAR(MAX),
@text4 VARCHAR(MAX),
@text5 VARCHAR(MAX),
@dbname VARCHAR(64)
SET @dbname='DB_NAME'
SET @text1='TEXT1_TO_SEARCH'
SET @text2='TEXT2_TO_SEARCH'
-- Veritabanı nesne içerikleri
SELECT * FROM sys.syscomments(NOLOCK)
-- Şema isimlerinin tutulduğu tablo
SELECT * FROM sys.schemas(NOLOCK)
-- Bütün veritabanı nesne isimleri
SELECT * FROM sys.all_objects(NOLOCK)
-- ana select ifadesi
@yemrekeskin
yemrekeskin / FluentTestProcessor.cs
Last active August 29, 2015 13:56
FluentTestProcessor - code sample for Fluent Interface
public class TestProcessorOutput
{
public string ScreenTestOutputMessage { get; set; }
public string StoredProcedureTestOutputMessage { get; set; }
public string RunOutPutFileValidationTestOutputMessage { get; set; }
public string RunInputFilevalidationTestOutputMessage { get; set; }
}
public interface ITestProcessor
{