Skip to content

Instantly share code, notes, and snippets.

View DavidMoore's full-sized avatar

David Moore DavidMoore

View GitHub Profile
@DavidMoore
DavidMoore / NameValueCollectionExtensions.cs
Last active July 23, 2021 11:39
Extension methods for converting NameValueCollection to a query string
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
namespace System.Collections.Specialized
{
public static class NameValueCollectionExtensions
{
/// <summary>
/// Converts a name/value collection to a query string by joining
@DavidMoore
DavidMoore / Program.cs
Last active August 29, 2015 14:07
Using WinRT libraries from a Windows Desktop application: Setting the LockScreen image
namespace WinRTTest
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.System.UserProfile;
@DavidMoore
DavidMoore / UnrealProjectMenuRegistration.cmd
Created September 5, 2014 11:24
Unreal Project Menu Registration batch file
:: UnrealProjectMenuRegistration.cmd
::
:: This batch file will try to find where the Unreal Engine is installed, then update your registry
:: to register the Unreal Project File type (and its right click menu for things such as generating
:: Visual Studio project files, and launching)
::
:: Run as an Administrator, as it's required for writing to HKLM.
::
:: Author: David Moore <david@sadrobot.co.nz>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Test">
<Target Name="Test">
<PropertyGroup>
<StartTicks>$([System.DateTime]::UtcNow.Ticks)</StartTicks>
</PropertyGroup>
<Message Text="Starting ticks: $(StartTicks)"/>