- Msbuild Project tools
- ESLint
- npm
- npm intellisence
- Vue.js extension pack
- Vetur - (vue tooling for VS Code)
- docker
- vscode-database
This file contains hidden or 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
readonly Mock<ILog> log4netMock = new Mock<ILog>(); | |
[Test] | |
public void SingleSendActionWithException_ErrorLoggedOnce() | |
{ | |
Smock.Run(context => | |
{ | |
// Arrange | |
context.Setup(() => LogManager.GetLogger(It.IsAny<Type>())).Returns(log4netMock.Object); |
This file contains hidden or 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 LogglyQueue : StatisticsMessagingQueue | |
{ | |
private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
public override bool SendAction(ActionMessage message) | |
{ | |
.... | |
} | |
} |
This file contains hidden or 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.Threading; | |
using Funq; | |
using ServiceStack; | |
public class AppHost : AppSelfHostBase | |
{ | |
public static ManualResetEvent ShouldQuit = new ManualResetEvent(false); |
This file contains hidden or 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.Globalization; | |
using ServiceStack.Text; | |
using System; | |
JsConfig<Int32>.DeSerializeFn = x => Int32.Parse(x, CultureInfo.InvariantCulture); | |
var result = JsonSerializer.DeserializeFromString("011",typeof(Int32)); | |
// Save a copy of this *public* Gist by clicking the "Save As" below |
This file contains hidden or 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 ServiceStack; | |
using ServiceStack.Text; | |
using ServiceStack.OrmLite; | |
using ServiceStack.OrmLite.Sqlite; | |
using ServiceStack.DataAnnotations; | |
var dbFactory = new OrmLiteConnectionFactory(":memory:", SqliteDialect.Provider); | |
var db = dbFactory.Open(); // Open ADO.NET DB Connection | |
public class Todo |
This file contains hidden or 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
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install -y git | |
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list' | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893 | |
sudo apt-get update | |
sudo apt-get install -y dotnet-dev-1.0.0-preview2.1-003177 | |
mkdir -p /var/www/netcore && chown -R www-data:www-data /var/www | |
su -c "cd /var/www/netcore && git clone https://github.com/NetCoreApps/Hello" -s /bin/sh www-data | |
find /var/www/netcore/Hello -type f -name "Program.cs" -exec sed -i "s/UseStartup<Startup>()/UseStartup<Startup>().UseUrls(\"http:\/\/0.0.0.0:5050\")/g" {} + |
This file contains hidden or 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.Threading; | |
using ServiceStack; | |
using ServiceStack.Text; | |
var useUtc = JsConfig.AlwaysUseUtc; | |
TestClass t1 = new TestClass(){A=5, B="Hello"}; | |
t1.TC2 = new TestClass2(){A2="Hello from TestClass2", B2=10}; |
This file contains hidden or 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
//Compute md5 | |
using System.Security.Cryptography; | |
using System.Text; | |
string code = "Hello, World!"; | |
string hash; | |
using (MD5 md5 = MD5.Create()) | |
{ | |
byte[] retVal = md5.ComputeHash(Encoding.Unicode.GetBytes(code)); |
This file contains hidden or 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.IO; | |
using System.Threading; | |
for(int i=0;i<10;i++) | |
{ | |
Console.WriteLine("i={0}",i); | |
Thread.Sleep(1000); | |
} |
NewerOlder