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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Run().Wait(); | |
} | |
public static async Task Run() | |
{ | |
var uri = new Uri("https://myUrl.com"); |
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 | |
clear | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list | |
sudo apt-get update | |
sudo apt-get -y install mono-devel | |
sudo apt-get -y install gyp automake make libtool |
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 ActionResult SentMultipleBackgroundMessage() | |
{ | |
var amount = 50000; | |
var stopwatch = new Stopwatch(); | |
stopwatch.Start(); | |
foreach (var index in Enumerable.Range(0, amount)) | |
{ | |
MvcApplication.ServiceBus.Publish(new StartMultipleBackgroundWorkMessage |
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 OwinAuthentication | |
{ | |
public static void Enable(IPipelines pipelines, OwinAuthenticationConfiguration configuration) | |
{ | |
if (pipelines == null) throw new ArgumentNullException("pipelines"); | |
if (configuration == null) throw new ArgumentNullException("configuration"); | |
pipelines.BeforeRequest.AddItemToStartOfPipeline(GetLoadAuthenticationHook(configuration)); | |
} |
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.Reactive.Linq; | |
using System.Threading.Tasks; | |
namespace RxTimer | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ |
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
app.directive('toggleButton', [function () { | |
return { | |
restrict: 'E', | |
templateUrl: '/App/views/shared/directives/toggle.button.html', | |
replace: true, | |
scope: { | |
model: '=', | |
ngDisabled: '=' | |
}, |
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
angular.module('directives', []) | |
.directive('wysihtml5', ['$timeout', function ($timeout) { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: function ($scope, $element, attrs, ngModel) { | |
var element = $($element).wysihtml5({ | |
stylesheets: [], |
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
class Program | |
{ | |
public static List<string> ScreenInformation = new List<string> | |
{ | |
"hi", | |
"oi", | |
"whats", | |
"up" | |
}; |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var command = new AsyncRelayCommand( | |
async () => | |
{ | |
await Task.Delay(TimeSpan.FromSeconds(1)); | |
Console.WriteLine("hi"); | |
}); |
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 JsonContent : StringContent | |
{ | |
public JsonContent(object contentObject) : base(JsonConvert.SerializeObject(contentObject), Encoding.UTF8, "application/json") {} | |
public JsonContent(string content) : base(content) {} | |
public JsonContent(string content, Encoding encoding) : base(content, encoding) {} | |
public JsonContent(string content, Encoding encoding, string mediaType) : base(content, encoding, mediaType) {} | |
} |
NewerOlder