Skip to content

Instantly share code, notes, and snippets.

View ardacetinkaya's full-sized avatar
👨‍💻
Coding with ❤

Arda Cetinkaya ardacetinkaya

👨‍💻
Coding with ❤
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using HelloRazor.Model;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace HelloRazor.Pages
{
@ardacetinkaya
ardacetinkaya / legochecker.js
Last active January 21, 2016 21:19
Blog'da yer verdiğim küçük bir yazıda anlattığım, node.js için ile yapılmış, basit bir web sitesi parse etmek ve sonra e-mail atmak gerekli olan script örneği... Ayrıntılarına http://www.minepla.net/2016/01/lego-azure-webjobs-nodejs/ yazısından bakabilirsiniz.
/* global $ */
/* global callback */
var http = require('http');
var cheerio = require('cheerio');
var sendgrid = require('sendgrid')([SEND_GRID_KEY]);
var azure = require('azure-storage');
function LegoChecker() {
this.Sender = '[SENDER_EMAIL]';
this.Receivers = '[RECEIVER_EMAIL]';
@ardacetinkaya
ardacetinkaya / .bash_profile
Created January 8, 2016 18:51 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@ardacetinkaya
ardacetinkaya / EmailAddressValidator.cs
Created October 8, 2014 19:32
Using regular expression for validating e-maill address can be tough sometimes. But System.Net.Mail.MailAddress simply do it for you.
public bool IsValid(string email)
{
try
{
System.Net.Mail.MailAddress address = new System.Net.Mail.MailAddress(email);
return true;
}
catch (Exception)
{
@ardacetinkaya
ardacetinkaya / IValidator.cs
Created October 8, 2014 19:12
An easy Validation pattern implementation for any kind of application...
//Generic interface for Validators
public interface IValidator<T>
{
IEnumerable<ValidationResult> Validate(T businessEntity);
}