Skip to content

Instantly share code, notes, and snippets.

View danparker276's full-sized avatar

Dan danparker276

  • Los Angeles
View GitHub Profile

Resolving Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.

If you're trying to run git push origin main or basically accessing your remote git and you get the bellow error this blog is for you to get it resolved

error

remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.

remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
@mattbajorek
mattbajorek / ClapsController.cs
Last active May 10, 2020 02:08
Policy Based Authorization
...
using Microsoft.AspNetCore.Authorization;
...
[Authorize]
[Route("api/[controller]")]
[ApiController]
public class ClapsController : ControllerBase
@mattbajorek
mattbajorek / Startup.cs
Last active May 10, 2020 02:09
Add Policy Based Authorization
...
public void ConfigureServices(IServiceCollection services)
{
...
services
.AddAuthorization(options =>
{
options.AddPolicy("Admin", policy => policy.RequireClaim("custom:groupId", new List<string> { "0" } ));
@danparker276
danparker276 / ApplyAzureSettings.ps1
Created November 11, 2018 18:04
Azure Powershell copy but not replace app settings and connection strings for WebApps and Azure Functions
#For copying Azure WebApp or Azure Functions application settings and connection strings
#This will copy from Web App, but not replace, because things like Insights, storage and existing settings
#you probably want to keep at times. Most samples I found were only complete replacements which I didn't want
#Make sure you're logged in
try{
$acct = Get-AzureRmSubscription
}
catch{
Login-AzureRmAccount
@danparker276
danparker276 / Expo_Push_Notifications_Helper.cs
Created August 17, 2018 22:38 — forked from rbravo/Expo_Push_Notifications_Helper.cs
Expo.io Push Notifications Send Through C#
public class ExpoPushHelper
{
public class MyWebClient : WebClient
{
protected override WebRequest GetWebRequest(Uri address)
{
HttpWebRequest request = base.GetWebRequest(address) as HttpWebRequest;
request.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip;
return request;
}
@rbravo
rbravo / Expo_Push_Notifications_Helper.cs
Last active July 24, 2021 06:42
Expo.io Push Notifications Send Through C#
public class ExpoPushHelper
{
public static dynamic SendPushNotification(string ExpoToken)
{
dynamic body = new
{
to = ExpoToken,
title = "hello",
body = "world",
sound = "default",