This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# logging to DbgView with OutputDebugString | |
# from https://gist.github.com/ngbrown/d38064a844426a00fdaa and https://gist.github.com/wh13371/92df4715fc17eb74299d | |
import logging | |
import ctypes | |
# output "logging" messages to DbgView via OutputDebugString (Windows only!) | |
OutputDebugStringW = ctypes.windll.kernel32.OutputDebugStringW | |
OutputDebugStringW.argtypes = [ctypes.c_wchar_p] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import-Module .\FileNameUtils.psm1 | |
function Rename-FilesToSHA { | |
[CmdletBinding()] | |
Param( | |
[ValidateScript({ Test-Path $_ })] | |
$Path | |
) | |
$hasher = [System.Security.Cryptography.HashAlgorithm]::Create('SHA1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 3.4.5.{build} | |
configuration: Release | |
platform: Any CPU | |
environment: | |
RABBITMQ_RABBITMQCTL_PATH: C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.4.1\sbin\rabbitmqctl.bat | |
install: | |
- ps: >- | |
choco install rabbitmq -Version 3.4.1.0 | |
Set-Item -Path Env:\ERLANG_HOME -Value ([Environment]::GetEnvironmentVariables("Machine")["ERLANG_HOME"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BindableBase : INotifyPropertyChanged | |
{ | |
/// <summary> | |
/// Multicast event for property change notifications. | |
/// </summary> | |
public event PropertyChangedEventHandler PropertyChanged; | |
/// <summary> | |
/// Checks if a property already matches a desired value. Sets the property and | |
/// notifies listeners only when necessary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TileCanvas : Canvas | |
{ | |
public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register( | |
"ImageSource", | |
typeof(ImageSource), | |
typeof(TileCanvas), | |
new PropertyMetadata(null, ImageSourceChanged)); | |
private Size lastActualSize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace StepDefinitions | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using TechTalk.SpecFlow; | |
using TechTalk.SpecFlow.Assist; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Extenders | |
{ | |
using System.ComponentModel; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Documents; | |
/// <summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Utilities | |
{ | |
using System.Collections; | |
using System.Collections.Generic; | |
/// <remarks> | |
/// From http://www.dotnetperls.com/alphanumeric-sorting | |
/// </remarks> | |
public class AlphanumComparatorFast : IComparer<string>, IComparer | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef STRSTARTSWITH_H_ | |
#define STRSTARTSWITH_H_ | |
// From http://blogs.msdn.com/b/the1/archive/2004/05/07/128242.aspx | |
#ifndef __GNUC__ | |
template <typename T, size_t N> | |
char ( &_ArraySizeHelper( T (&array)[N] ))[N]; | |
#define countof(array) (sizeof(_ArraySizeHelper(array))) | |
#else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WideCharToMultiByteTest.c : Demonstrates Windows reading past the source string | |
// when using WideCharToMultiByte. | |
// The source problem uses UNICODE_STRING, so it may not be null terminated. | |
// | |
#define _WIN32_WINNT 0x400 | |
#include <WinSDKVer.h> | |
#include <stdio.h> | |
#include <tchar.h> |