Skip to content

Instantly share code, notes, and snippets.

View jesperordrup's full-sized avatar

Jesper Ordrup jesperordrup

View GitHub Profile
@jesperordrup
jesperordrup / gist:a16fae43916e621c688f
Created June 15, 2014 20:07
Distance between two coords (lat lng)
var sCoord = new GeoCoordinate(sLatitude, sLongitude);
var eCoord = new GeoCoordinate(eLatitude, eLongitude);
return sCoord.GetDistanceTo(eCoord);
@jesperordrup
jesperordrup / gist:64d5d3f83fcbc2ac725b
Last active August 29, 2015 14:02
redirect to Primary - if page is requested via any other url than primaryUrl then permanent redirect to primaryUrl
@{
Layout = null;
string primaryUrl = "www.jesper.com";
string adjustedUrl = "";
bool doRedirect = false;
var thisUrl = HttpContext.Current.Request.Url;
string host = thisUrl.Host.ToLower();
string PathAndQuery = thisUrl.PathAndQuery;
@jesperordrup
jesperordrup / FormMailChimpController.cs
Last active August 29, 2015 14:15
Umbraco MailChimp Angularjs Ajax Form Post to WebAPI. Clean App_Code and 100% control of everything.
using MailChimp;
using MailChimp.Helper;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.ServiceModel.Channels;

Keybase proof

I hereby claim:

  • I am jesperordrup on github.
  • I am jesperordrup (https://keybase.io/jesperordrup) on keybase.
  • I have a public key ASAcTjnv9Z6oOOa2xJ9HSvAdWJLVC9MYy-Ns_prEcynpIAo

To claim this, I am signing this object:

2024-08-27T07:23:55.2661343Z Current runner version: '2.319.1'
2024-08-27T07:23:55.2671183Z Runner name: 'xxx-sys07'
2024-08-27T07:23:55.2672572Z Runner group name: 'xxx'
2024-08-27T07:23:55.2674143Z Machine name: 'xxx-sys07'
2024-08-27T07:23:55.2698081Z Testing runner upgrade compatibility
2024-08-27T07:23:55.4133507Z ##[group]GITHUB_TOKEN Permissions
2024-08-27T07:23:55.4138367Z Actions: write
2024-08-27T07:23:55.4140216Z Attestations: write
2024-08-27T07:23:55.4142164Z Checks: write
2024-08-27T07:23:55.4145636Z Contents: write