Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Onur Celik onurcelikeng

🏠
Working from home
  • Garanti BBVA Technology
  • Istanbul, Turkey
Block or report user

Report or block onurcelikeng

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@onurcelikeng
onurcelikeng / SlackClient.cs
Created Feb 6, 2018 — forked from jogleasonjr/SlackClient.cs
A simple C# class to post messages to a Slack channel. You must have the Incoming WebHooks Integration enabled. This class uses the Newtonsoft Json.NET serializer available via NuGet. Scroll down for an example test method and a LinqPad snippet. Enjoy!
View SlackClient.cs
using Newtonsoft.Json;
using System;
using System.Collections.Specialized;
using System.Net;
using System.Text;
//A simple C# class to post messages to a Slack channel
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet
public class SlackClient
{
View Repository.cs
public class Repository<T> : IDisposable, IRepository<T> where T : class
{
DataContext context;
DbSet<T> Table;
public Repository()
{
context = new DataContext();
Table = context.Set<T>();
View BaseController.cs
public class BaseController : ApiController
{
public IHttpActionResult Success(string message)
{
return Ok(new ResultModel<string>()
{
IsSuccess = true,
Message = message,
Data = null
});
View php_distance
<?php
function getDistanceBetweenPointsNew($latitude1, $longitude1, $latitude2, $longitude2) {
$theta = $longitude1 - $longitude2;
$miles = (sin(deg2rad($latitude1)) * sin(deg2rad($latitude2))) + (cos(deg2rad($latitude1)) * cos(deg2rad($latitude2)) * cos(deg2rad($theta)));
$miles = acos($miles);
$miles = rad2deg($miles);
$miles = $miles * 60 * 1.1515;
$seamiles = $miles * 0.868976242;
$feet = $miles * 5280;
$yards = $feet / 3;
You can’t perform that action at this time.