This file contains hidden or 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
<# | |
.SYNOPSIS | |
Configures the repo permissions to restrict branch names. | |
.DESCRIPTION | |
Branches should be master, release/, hotfix/, feature/ etc | |
This script ensures that they are. | |
.PARAMETER CollectionName | |
Name of the Azure DevOps organization/collection. | |
.PARAMETER ProjectName | |
Name of the project in the Azure DevOps organization to configure. |
This file contains hidden or 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
--palette-primary-darken-6: rgba(0, 103, 181, 1); | |
--palette-primary-darken-10: rgba(0, 91, 161, 1); | |
--palette-primary-darkened-6: 0, 103, 181; | |
--palette-primary-darkened-10: 0, 91, 161; | |
--palette-primary-shade-30: 0, 69, 120; | |
--palette-primary-shade-20: 0, 90, 158; | |
--palette-primary-shade-10: 16, 110, 190; | |
--palette-primary: 0, 120, 212; | |
--palette-primary-tint-10: 43, 136, 216; | |
--palette-primary-tint-20: 199, 224, 244; |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Threading; | |
namespace GenesisCoast.Tests.Fakes | |
{ | |
/// <summary> |
This file contains hidden or 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
function stringifyGr(record) { | |
var result = ["{"]; | |
var multiline = false; | |
for (var key in record) { | |
if(record.hasOwnProperty(key)) { | |
var value = record[key].toString(); | |
switch (typeof value) { | |
case "undefined": |
This file contains hidden or 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.Linq.Expressions; | |
using System.Reflection; | |
/// <summary> | |
/// Helper methods to convert the specified property in a class to an Action object which can then be UnitTested. | |
/// </summary> | |
public class TestHelper | |
{ | |
/// <summary> |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Here is an example of how your script most-likely looks. | |
.NOTES | |
Version : 1.0 | |
Author : Harry Sanderson | |
Date : 02/01/2019 | |
#> | |
param( |
This file contains hidden or 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
# Implementation | |
function Batch-Pipe { | |
[CmdletBinding()] | |
[OutputType('System.String')] | |
param( | |
[Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
[ValidateNotNull()] | |
$InputArray | |
) |
This file contains hidden or 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
// Original - Usage and Implementation | |
httpClient | |
.get("https://google.com") | |
.pipe( | |
share(), | |
retry(2), | |
catchError((err, caught) => { | |
console.log(`${fileName} - ${err.statusText} (HTTP ${err.status})`, err, caught, optionalParams); | |
return throwError(err); |
This file contains hidden or 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
// Method 1 - Implementation | |
export class Person { | |
public name: string = "default" | |
public address: string = "default" | |
public age: number = 0; | |
public constructor(init?:Partial<Person>) { | |
Object.assign(this, init); | |
} |
This file contains hidden or 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
interface IDisposable { | |
dispose(); | |
} | |
function using<T extends IDisposable>(resource: T, func: (resource: T) => void) { | |
try { | |
func(resource); | |
} | |
finally { | |
resource.dispose(); |
NewerOlder