Skip to content

Instantly share code, notes, and snippets.

Avatar

Christos Matskas cmatskas

View GitHub Profile
@cmatskas
cmatskas / p4merge.md
Created Jun 3, 2021
Set up p4merge as the default merge and diff tool in Git
View p4merge.md

Assuming that P4Merge was installed in the default location on Windows, i.e 'C:\Program Files\Perforce\p4merge.exe' then the following commands will configure p4merge as the default tool for both merge and diffs in Git

Set up commands

$ git config --global diff.tool p4merge
$ git config --global difftool.p4merge.path 'C:\Program Files\Perforce\p4merge.exe'
$ git config --global merge.tool p4merge
$ git config --global mergetool.p4merge.path 'C:\Program Files\Perforce\p4merge.exe'
View FeatherHttpAuthentication.cs
using System.Collections.Concurrent;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Identity.Web;
using Microsoft.Identity.Web.Resource;
using Microsoft.Identity.Web.TokenCacheProviders.InMemory;
View FeatherHttpTodocalls.cs
using System.Collections.Concurrent;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
namespace testFeather
{
class Program
{
private static ConcurrentBag<TodoItem> todoItemCollection;
View barebonesProgram.cs
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
namespace testFeather
{
class Program
{
static async Task Main(string[] args)
{
View MSIProgam.cs
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Azure.KeyVault;
using Microsoft.Azure.Services.AppAuthentication;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.AzureKeyVault;
namespace demo
{
public class Program
View claims.cshtml
@page
@model EasyAuthDemo.Pages.ClaimsModel
<div class="row">
<div class="col-md-12">
<table class="table table-responsive table-striped">
@if (HttpContext.User.Identity.IsAuthenticated)
{
foreach (var c in Model.UserClaims)
{
View EasyAuthUserValidationMiddlewareExtensions.cs
using Microsoft.AspNetCore.Builder;
namespace EasyAuthDemo
{
public static class EasyAuthUserValidationMiddlewareExtensions
{
public static IApplicationBuilder UseEasyAuthUserValidation(
this IApplicationBuilder builder)
{
return builder.UseMiddleware<EasyAuthUserValidationMiddleware>();
View EasyAuthUserValidationMiddleware.cs
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Security.Claims;
using System.Security.Principal;
using System.Threading.Tasks;
View CosmosDbDataHelper.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using Bogus;
using Microsoft.Azure.Cosmos;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
namespace ConsoleApp1
View Volcano.cs
public class Volcano
{
public string VolcanoName { get; set; }
public string Country { get; set; }
public string Region { get; set; }
public Location Location { get; set; }
public Measurements Measurements { get; set; }
public int Elevation { get; set; }
public string Type { get; set; }
public string Status { get; set; }