Skip to content

Instantly share code, notes, and snippets.

Matt Chandler mkchandler

Block or report user

Report or block mkchandler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mkchandler
mkchandler / ActiveDomainControllers.cs
Created Feb 25, 2014
Gets a list of all available domain controllers or find a single available controller.
View ActiveDomainControllers.cs
using System;
using System.DirectoryServices.ActiveDirectory;
namespace ActiveDomainControllers
{
public class Program
{
public static void Main(string[] args)
{
// Get a list of all available domain contollers
@mkchandler
mkchandler / DisableNuGetPackageRestore.ps1
Last active Feb 13, 2018
Disable the NuGet Package Restore functionality in a Visual Studio solution.
View DisableNuGetPackageRestore.ps1
# Usage: .\DisableNuGetPackageRestore.ps1 C:\Path\To\Solution.sln
# Get the path that the user specified when calling the script
$solution = $args[0]
$solutionPath = Split-Path $solution -Parent
$solutionName = Split-Path $solution -Leaf
# Delete the .nuget directory and all contents
Remove-Item (Join-Path $solutionPath ".nuget") -Force -Recurse -ErrorAction 0
@mkchandler
mkchandler / ReadSerialPort.cs
Created Dec 15, 2012
Some C# code to read a serial port. Using this as a starting point for an Arduino project.
View ReadSerialPort.cs
using System;
using System.IO.Ports;
namespace SerialReader
{
class Program
{
static void Main(string[] args)
{
var reader = new ArduinoSerialReader("COM3");
@mkchandler
mkchandler / Setting up SourceGear DiffMerge for Git.md
Last active Feb 6, 2019
Setup guide for making Git recognize and use SourceGear DiffMerge.
View Setting up SourceGear DiffMerge for Git.md
  1. Download SourceGear DiffMerge: http://sourcegear.com/diffmerge/index.html

  2. Add the following to your global .gitconfig file:

     [diff]
         tool = DiffMerge
     [difftool "DiffMerge"]
         cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' "$LOCAL" "$REMOTE"
     [merge]
         tool = DiffMerge
    
You can’t perform that action at this time.