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
/// <summary> | |
/// Helper methods for mounting a UNC network share | |
/// </summary> | |
public class UncAccess | |
{ | |
/// <summary>The domain.</summary> | |
private string domain; | |
/// <summary>The last error.</summary> | |
private int lastError; |
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
#add the repositories | |
sudo apt-get update && sudo apt-get install -y curl | |
curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | sudo apt-key add - | |
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" | sudo tee /etc/apt/sources.list.d/freeswitch.list | |
sudo apt-get update | |
# install dependencies | |
sudo apt-get install -y git build-essential libyuv-dev libvpx2-dev liblua5.2-dev libvpx2-dev libvpx2 zlib1g-dev libspeex1 libopus-dev libsndfile-dev autoconf automake devscripts gawk g++ git-core 'libjpeg-dev|libjpeg62-turbo-dev' libncurses5-dev 'libtool-bin|libtool' make python-dev pkg-config libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-devlibspeex-dev libspeexdsp-dev libedit-dev libpq-dev libjpeg-dev libsqlite3-dev libcurl4-openssl-dev libpcre3-dev libldns-dev bison |
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
using (var content = new MultipartFormDataContent()) | |
{ | |
//hackety hack hack hack | |
//this will throw if object has complex/nested properties | |
var messageAsKeyValuePairs = JsonConvert.DeserializeObject<IDictionary<string, string>>(JsonConvert.SerializeObject(message)); | |
foreach (var kvp in messageAsKeyValuePairs.Where(kvp => kvp.Value != null)) | |
{ | |
content.Add(new StringContent(kvp.Value), kvp.Key); | |
} |
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
# Given a Directory with the following files | |
# Implement Digits.ToFileString(input) where input is a positive integer | |
# Such that it outputs a "!" delimited list of file names to play | |
# in order to read out the number | |
0.wav | |
1.wav | |
10.wav | |
11.wav | |
12.wav |
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 IOCContainer.Tests | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Shouldly; | |
using Xunit; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- Last updated 15.05.2012 --> | |
<Patterns xmlns="urn:shemas-jetbrains-com:member-reordering-patterns"> | |
<!-- Do not reorder COM interfaces --> | |
<Pattern> | |
<Match> | |
<And Weight="2000"> | |
<Kind Is="interface"/> | |
<Or> |
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 CommandHandlersModule : NinjectModule | |
{ | |
public override void Load() | |
{ | |
this.Kernel.Bind( | |
x => | |
x.FromAssembliesMatching("WordWatch.*") | |
.SelectAllClasses() | |
.InheritedFrom(typeof(ICommandHandler<>)) | |
.BindAllInterfaces()); |
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
if(expectedVersion == ExpectedVersion.NoStream) | |
{ | |
using(var tx = _connection.BeginTransaction(IsolationLevel.Serializable)) | |
{ | |
int streamIdInternal = -1; | |
using( | |
var command = | |
new NpgsqlCommand( | |
"INSERT INTO streams(id, id_original) VALUES (:stream_id, :stream_id_original) RETURNING id_internal;") | |
) |
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 SomeFixture : IDisposable | |
{ | |
private DockerClient client; | |
public SomeFixture() | |
{ | |
Console.WriteLine("SomeFixture ctor: This should only be run once"); | |
//Using https://github.com/ahmetalpbalkan/Docker.DotNet | |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Reflection; | |
using ServiceStack.Net30.Collections.Concurrent; | |
/// <summary> |
NewerOlder