Skip to content

Instantly share code, notes, and snippets.

View steenhulthin's full-sized avatar

Steen Hulthin Rasmussen steenhulthin

View GitHub Profile
@steenhulthin
steenhulthin / gist:60429e19812ce3d589fb
Created November 29, 2014 13:48
Incomplete hack?
public static bool Is<T>(this IFeature feature)
{
// note: this implementation is a complete hack.
return true;
}
@steenhulthin
steenhulthin / IRowExtension.cs
Created November 14, 2014 10:59
Extension method for the ArcGIS IRow
using System;
using ESRI.ArcGIS.Geodatabase;
namespace DSredigering.ExtensionMethods
{
public static class IRowExtension
{
public static void SetField(this IRow row, string fieldname, object value)
{
if (fieldname == null) throw new ArgumentNullException("fieldname");
@steenhulthin
steenhulthin / example.geojson
Last active August 29, 2015 14:05
geojson simple example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@steenhulthin
steenhulthin / postnummerkort.geojson
Last active August 29, 2015 14:05
Danish borders as geojson - based on postal (Zip) code map from GST (http://gst.dk)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@steenhulthin
steenhulthin / readme.rst
Created June 6, 2014 13:06
Showing Github ReStructuredText rendering capabilities.

rst test

def my_function():
    "just a test"
    print 8/2
@steenhulthin
steenhulthin / gist:7466660
Created November 14, 2013 13:20
Diff zipped files. Add this to the git config file.
[diff "docx"]
textconv = unzip -c -a
@steenhulthin
steenhulthin / VisualStudioReporter.cs
Created November 2, 2013 17:52
Getting the path for ApprovalTests VisualStudioReporter from the registry.
public class VisualStudioReporter : GenericDiffReporter
{
private static readonly string DEVENV_REGISTRYKEY =
@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\devenv.exe";
private static readonly string PATH = (string)Registry.GetValue(DEVENV_REGISTRYKEY, "", @"Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe");
public static readonly VisualStudioReporter INSTANCE = new VisualStudioReporter();
public VisualStudioReporter()
: base(
PATH,
public partial class Program
{
private static readonly int FirstLed = 0;
private static readonly int LastLed = 6;
private int _ledNumberToModify = FirstLed;
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
Debug.Print("Program Started");
@steenhulthin
steenhulthin / gist:7066203
Created October 20, 2013 07:54
Error message from wp-markdown-syntaxhighlighter
Parse error: syntax error, unexpected T_FUNCTION in /plugins/wp-markdown-syntaxhighlighter/wp-markdown-syntaxhighlighter.php on line 49
namespace noget
{
class Abe
{
public Abe(Action anoMethod)
{}
}
class Chimp : Abe
{