Skip to content

Instantly share code, notes, and snippets.

using System;
using System.IO;
using System.Reflection;
namespace Kake
{
class Bootstrap
{
delegate int EntryPoint(string[] args);
@zclancy
zclancy / Common.cs
Created July 17, 2012 15:08
A simple console application for testing Lync Group Chat SDK. Command line parameters build the message, and specify the chat room. NDesk.Options is used for command line argument parsing.
using System;
using System.Configuration;
using System.Net;
using Microsoft.Rtc.Collaboration;
using Microsoft.Rtc.Collaboration.GroupChat;
using Microsoft.Rtc.Signaling;
namespace GroupChat
{
public static class Common
@rebcabin
rebcabin / gist:5657986
Last active January 8, 2016 14:40
Rx LINQ Operator Precis
Rx LINQ Operator Precis
Brian Beckman, May 2013
================================================================================
Introduction
================================================================================
This is a highly abbreviated "cheat-sheet" for the LINQ operators over Rx, the
Reactive Extensions. Its purpose is to TEACH by laying bare the regular and
tasteful structure of the API. This structure can be difficult to perceive from
ordinary documentation and source code because comparable and contrastable
@FransBouma
FransBouma / StringBuilderCache.cs
Created December 4, 2017 15:00
Adjusted StringBuilderCache, which caches 4 string builders at once
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
/*============================================================
**
** Class: StringBuilderCache
**
** Purpose: provide a cached reusable instance of stringbuilder
@FeodorFitsner
FeodorFitsner / deploy.ps1
Created September 27, 2016 06:04
Parallel copying over FTP with WinSCP
param (
$sessionUrl = "ftp-host-name",
$username = "your-username",
$password = "your-password",
$remotePath = "/",
$localPath = "C:\projects\...",
$batches = 20
)
@chrisfraser
chrisfraser / .hgignore
Created February 1, 2013 09:02
A full list of entries for the .hgignore file when using VS2012.
# use glob syntax
syntax: glob
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
@dadhi
dadhi / index.md
Last active March 11, 2019 11:03
Discriminated Union or ADT Sum-type in C#
@simonbondo
simonbondo / convert-svn2git.ps1
Created November 26, 2019 09:40
Converts a collection of projects from a SVN mono-repo to separate git repos.
# Where svn.exe can be found
$svnPath = 'C:\Data\svn'
# Where the resulting git repositories should be created
$gitRepoPath = 'C:\Data\svn\git'
# The branch that should become the default branch in the git repository
$defaultBranch = 'trunk'
$removeTempRepository = $true
# The URL to the SVN server (can be file:///)
$svnRepoUrl = 'file:///c:\Data\svn\SVNRepo'
# The relative paths of each project inside the SVN repository, where 'trunk', 'branches' and 'tags' folders can be found
@richlander
richlander / Program.cs
Last active May 9, 2020 21:29
Environment information
using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
using static System.Console;
namespace versioninfo
{
class Program
{
anonymous
anonymous / ImmutableAppendOnlyList.cs
Created December 6, 2013 06:43
An immutable list for readers that allows appends at the end and removal at the front.
/// <summary>
/// A list that can be used by readers as a true immutable read-only list
/// and that supports relatively efficient "append to the end" and "remove
/// from the front" operations, by sharing the underlying array whenever
/// possible. Implemented as a class so it can be used to "CAS" when making
/// changes in order to allow lockless immutability.
/// </summary>
public class ImmutableAppendOnlyList<T> : IReadOnlyList<T>
{
private delegate void RangeCopier(IEnumerable<T> source, T[] dest, int destOffset, int count);