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 Infrastructure | |
{ | |
using System; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using Nancy; | |
using Util; |
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> |
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
while (_isRunning) | |
{ | |
try | |
{ | |
if (channel == null || consumer == null) | |
{ | |
try | |
{ | |
_connection = factory.CreateConnection(); | |
channel = _connection.CreateModel(); |
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
angular.module('bDatepicker', []). | |
directive('bDatepicker', function(){ | |
return { | |
require: '?ngModel', | |
restrict: 'A', | |
link: function ($scope, element, attrs, controller) { | |
var updateModel, onblur; | |
if (controller != null) { | |
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
namespace Foo.Common.Messaging.EasyNetQ | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Threading.Tasks; |
NewerOlder