Skip to content

Instantly share code, notes, and snippets.

@matthewvukomanovic
matthewvukomanovic / .gitattributes
Last active July 18, 2016 04:58
Test Stepping through code with optimisations enabled
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
@matthewvukomanovic
matthewvukomanovic / addselftosqlsysadmin.cmd
Created May 17, 2017 05:19 — forked from wadewegner/addselftosqlsysadmin.cmd
Script to add the current user to the sysadmin role in SQL Server
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
@matthewvukomanovic
matthewvukomanovic / Program.cs
Last active January 7, 2023 06:03
Autofac, OWIN, WebApi, and SignalR
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using Autofac;
using Autofac.Integration.SignalR;
using Autofac.Integration.WebApi;
using Microsoft.AspNet.SignalR;
@matthewvukomanovic
matthewvukomanovic / WritableTuple.cs
Created October 10, 2018 03:19
C# WritableTuple based on reflected Tuple
public interface IWritableTuple
{
int Length { get; }
object this[int index] { get; }
}
internal interface IWritableTupleInternal : IWritableTuple
{
string ToString(System.Text.StringBuilder sb);
@matthewvukomanovic
matthewvukomanovic / AlarmSounds.Fix.reg
Created June 12, 2020 04:34
A registry file for fixing the missing values for sound files in windows 10
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm\.Current]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,6d,00,65,00,64,00,69,00,61,00,5c,00,41,00,6c,00,61,00,72,00,6d,00,30,00,31,00,2e,00,77,00,61,00,76,00,00,00
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm10\.Current]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,6d,00,65,00,64,00,69,00,61,00,5c,00,41,00,6c,00,61,00,72,00,6d,00,31,00,30,00,2e,00,77,00,61,00,76,00,00,00
[HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm2\.Current]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,00,5c,00,6d,00,65,00,64,00,69,00,61,00,5c,00,41,00,6c,00,61,00,72,00,6d,00,30,00,32,00,2e,00,77,00,61,00,76,00,00,00