Skip to content

Instantly share code, notes, and snippets.

@jrusbatch
jrusbatch / AvailablePorts.cs
Created December 5, 2012 02:17
Find an Available Port with C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.NetworkInformation;
using System.Net;
namespace AvailablePort
{
class Program
@mxpv
mxpv / ProcessUtil.cs
Created September 28, 2012 09:31
Process start helper utility with CancellationToken and async output reading support
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Threading;
using Microsoft.Win32.SafeHandles;
namespace ConsoleApplication
{
public class ProcessUtil : IDisposable
{
@crazyfool2100
crazyfool2100 / Host Add-In
Created September 7, 2011 05:34
A host ExcelDna add-in loading and unloading another add-in
<DnaLibrary Name="Host Add-In" Language="CS" RuntimeVersion="v4.0">
<Reference AssemblyPath="System.Windows.Forms.dll"/>
<Reference Name="Microsoft.Office.Interop.Excel" />
<![CDATA[
using System;
using ExcelDna.Integration;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
public class HostAddIn: IExcelAddIn
@rbialek
rbialek / config
Created June 7, 2011 13:32
ssh/.config
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa