The following alias, lol creates a clean, reable graph of the commits using the git log command as the base:
git config --global alias.lol 'log --oneline --graph --decorate --all'
| https://drive.google.com/uc?export=download&id=1n7Ji3ca9V9PgSud36-QNR0fU44r95YKr |
| using Microsoft.Owin; | |
| using Owin; | |
| using Microsoft.Owin.Security; | |
| using Microsoft.Owin.Security.Cookies; | |
| using Microsoft.Owin.Security.OpenIdConnect; | |
| using System.Threading.Tasks; | |
| using Microsoft.IdentityModel.Protocols.OpenIdConnect; | |
| using System.Configuration; | |
| using System.Security.Claims; | |
| using IdentityModel.Client; |
| using Microsoft.Owin; | |
| using Owin; | |
| using System.Threading.Tasks; | |
| [assembly: OwinStartup(typeof(OWINSample.Startup))] | |
| namespace OWINSample | |
| { | |
| public class Startup | |
| { |
| using Microsoft.AspNetCore.HttpOverrides; | |
| var builder = WebApplication.CreateBuilder(args); | |
| // Add services to the container. | |
| builder.Services.AddRazorPages(); | |
| // Configure the Forwarded Headers | |
| builder.Services.Configure<ForwardedHeadersOptions>(options => | |
| { |
| // snippet around reading from HttpRequest.Body | |
| var request = context.Request; | |
| request.EnableBuffering(); | |
| // deserialize into temp structure using System.Text.Json.JsonSeralizer | |
| var temp = await JsonSerializer.DeserializeAsync<RequestTemp>(request.Body, | |
| options: new JsonSerializerOptions { PropertyNameCaseInsensitive = true }); | |
| request.Body.Seek(0, SeekOrigin.Begin); |
| for d in {1..6}; do touch "file${d}.md"; git add "file${d}.md"; git commit -m "adding file ${d}"; done |
The following alias, lol creates a clean, reable graph of the commits using the git log command as the base:
git config --global alias.lol 'log --oneline --graph --decorate --all'
| public async Task<int> GetNextIdAsync() | |
| { | |
| using (var connection = GetDbConnection()) | |
| { | |
| connection.Open(); | |
| var parameters = new DynamicParameters(); | |
| parameters.Add("@nextId", dbType: DbType.Int32, direction: ParameterDirection.ReturnValue); | |
| await connection.ExecuteAsync("[Schema].[sp_GetNextId]", parameters, commandType: CommandType.StoredProcedure).ConfigureAwait(false); | |
| var result = parameters.Get<int>("@nextId"); |
| public class ConfigCorsPolicyProvider : ICorsPolicyProvider | |
| { | |
| private readonly IConfigurationService configurationService; | |
| public ConfigCorsPolicyProvider(IConfigurationService configurationService) | |
| { | |
| this.configurationService = configurationService; | |
| } | |
| public Task<CorsPolicy> GetCorsPolicyAsync(HttpRequestMessage request, CancellationToken cancellationToken) |
| public class BrowserJsonFormatter : JsonMediaTypeFormatter | |
| { | |
| public BrowserJsonFormatter() | |
| { | |
| SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html")); | |
| SerializerSettings.Formatting = Formatting.Indented; | |
| } | |
| public override void SetDefaultContentHeaders(Type type, HttpContentHeaders headers, MediaTypeHeaderValue mediaType) | |
| { |