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> | |
/// Wrapper class for <see cref="IGremlinClient"/> that automatically retries send operations and logs | |
/// information about the CosmosDB dependency in Application Insights. | |
/// </summary> | |
public class GraphClient : IGraphClient | |
{ | |
private readonly TelemetryClient _telemetryClient; | |
private readonly IGremlinClient _client; | |
private readonly IOptions<GremlinSettings> _gremlinSettings; | |
private readonly ILogger<GraphClient> _logger; |
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
<CascadingValue Value="@ModalDialogService"> | |
@ChildContent | |
<div class="modal @ModalClasses" tabindex="-1" role="dialog" style="@ModalStyles"> | |
<div class="modal-dialog" role="document"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<h5 class="modal-title"> | |
@Title | |
</h5> | |
<button class="close" type="button" @onclick="HideDialog"></button> |
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
mpg | cylinders | displacement | horsepower | weight | acceleration | model year | origin | car name | |
---|---|---|---|---|---|---|---|---|---|
18 | 8 | 307 | 130 | 3504 | 12 | 70 | 1 | chevrolet chevelle malibu | |
15 | 8 | 350 | 165 | 3693 | 11.5 | 70 | 1 | buick skylark 320 | |
18 | 8 | 318 | 150 | 3436 | 11 | 70 | 1 | plymouth satellite | |
16 | 8 | 304 | 150 | 3433 | 12 | 70 | 1 | amc rebel sst | |
17 | 8 | 302 | 140 | 3449 | 10.5 | 70 | 1 | ford torino | |
15 | 8 | 429 | 198 | 4341 | 10 | 70 | 1 | ford galaxie 500 | |
14 | 8 | 454 | 220 | 4354 | 9 | 70 | 1 | chevrolet impala | |
14 | 8 | 440 | 215 | 4312 | 8.5 | 70 | 1 | plymouth fury iii | |
14 | 8 | 455 | 225 | 4425 | 10 | 70 | 1 | pontiac catalina |
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
#!/bin/sh | |
SUBSCRIPTION=$1 | |
ENVIRONMENT=$2 | |
az group create --name kubernetes-$ENVIRONMENT --location westeurope | |
az acs create --orchestrator-type kubernetes \ | |
--resource-group kubernetes-$ENVIRONMENT \ | |
--name $ENVIRONMENT \ | |
--generate-ssh-keys \ |
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> | |
/// Renders email content based on razor templates | |
/// </summary> | |
public interface ITemplateService | |
{ | |
/// <summary> | |
/// Renders a template given the provided view model | |
/// </summary> | |
/// <typeparam name="TViewModel"></typeparam> | |
/// <param name="filename">Filename of the template to render</param> |
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
import { ApiRequestOptions } from './api-request-options.service'; | |
import { Http, Response, RequestOptions, ResponseContentType } from '@angular/http'; | |
import 'rxjs/add/observable/zip'; | |
import 'rxjs/add/operator/map'; | |
import { Observable } from 'rxjs/Rx'; | |
import { Injectable } from '@angular/core'; | |
import { Router } from '@angular/router'; | |
@Injectable() |
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
export type MappingRule = (data: any) => any; | |
export type MappingRules<T> = { [P in keyof T]?: MappingRule }; | |
export type MapperFunction<T> = (input: T) => any; | |
// Maps property values based on rules that you supplied. | |
// Properties for which no rule was supplied are copied to the output. | |
// NOTICE: This mapper function does not support renaming properties. | |
export function mapObject<T>(input: T, rules: MappingRules<T>): any { | |
if(input === undefined || input === null) { | |
return input; |
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
$internetSettings = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"; | |
# Determines the current state of the proxy | |
function Get-ProxyState() { | |
$settings = Get-ItemProperty -Path $internetSettings; | |
return $settings.ProxyEnable; | |
} | |
# Enables the proxy. | |
# IMPORTANT: Change the defaults to something that is useful to you! |
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 Clients | |
{ | |
public static IEnumerable<Client> All => new[] | |
{ | |
new Client() | |
{ | |
AccessTokenType = AccessTokenType.Jwt, | |
ClientId = "9c328f06-01c7-4429-9870-7e55a73e2870", | |
RedirectUris = new List<string> | |
{ |
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.Threading.Tasks; | |
using Weblog.Models; | |
using Nest; | |
using Polly; | |
namespace Weblog.Services | |
{ | |
public class PostIndexer: IPostIndexer | |
{ |
NewerOlder