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
# Define variables | |
$organization = "" | |
$project = "" | |
$repositoryName = "" | |
$masterBranch = "master" | |
$devBranch = "develop" | |
$maxCommitsBehind = 500 | |
$apiKey = $env:AZURE_DEVOPS_API_KEY | |
# Validate API Key |
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
/* | |
Originally written by Daniel Crowther 16 Dec 2004. | |
Addresses the recursive deletion of child table entries, even those not directly related to the parent table, before ultimately attempting to delete from the parent table. | |
Passing 'Y' to @ExecuteDelete will run the deletion & wrap everything in a transaction | |
Passing 'Y' to @TrialRun rolls back the transaction after executing all the delete statements. |
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.Globalization; | |
using System.Net.Mime; | |
using System.Security.Cryptography; | |
using System.Text; | |
using Microsoft.AspNetCore.Mvc; | |
namespace EvaporateJSTest.Controllers; | |
[ApiController] | |
[Route("signAuth")] |
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
<policies> | |
<inbound> | |
<base /> | |
<!-- TODO: limit by client_id, not token itself --> | |
<rate-limit-by-key calls="30" renewal-period="10" counter-key="@(context.Request.Headers.GetValueOrDefault("Authorization",""))" /> | |
<choose> | |
<when condition="@(context.Request.Certificate != null && context.Request.Certificate.NotAfter > DateTime.Now)"> | |
<set-header name="Client-Certificate" exists-action="override"> | |
<value>@(context.Request.Certificate.GetRawCertDataString())</value> | |
</set-header> |
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.Data.Common; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MediatR; | |
namespace Foo | |
{ | |
public class DbDeadlockRetryHandlerProcessor<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> | |
{ |
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.Collections.Generic; | |
namespace builder | |
{ | |
/// <summary> | |
/// MainApp startup class for .NET optimized | |
/// Builder Design Pattern. | |
/// </summary> | |
public class MainApp |
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; | |
using System.Threading.Tasks; | |
namespace ConsoleApp | |
{ | |
class Program | |
{ | |
// Cancellation Tokens - https://docs.microsoft.com/en-us/previous-versions/dd997289(v=vs.110) | |
private static readonly CancellationTokenSource canToken = new CancellationTokenSource(); |
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
# POST method: $req | |
$requestBody = Get-Content $req -Raw | ConvertFrom-Json | |
$name = $requestBody.name | |
# GET method: each querystring parameter is its own variable | |
if ($req_query_name) | |
{ | |
$name = $req_query_name | |
} |
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
const removeCrap = () => { | |
const $crapSelector = $(` | |
span.ember-view span:contains(" likes this"), | |
span.ember-view span:contains(" commented on this"), | |
span.ember-view span:contains(" liked "), | |
span.ember-view span:contains("Short course you may like"), | |
div.feed-shared-text-view span:contains("Promoted") | |
`); | |
const crapCount = $crapSelector.length; |
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
const removeCrap = () => { | |
const $crapSelector = $(` | |
span.ember-view span:contains(" likes this"), | |
span.ember-view span:contains(" commented on this"), | |
span.ember-view span:contains(" liked "), | |
span.ember-view span:contains("Short course you may like"), | |
div.feed-shared-text-view span:contains("Promoted") | |
`); | |
const crapCount = $crapSelector.length; |
NewerOlder