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
| param | |
| ( | |
| [String]$Path, | |
| [String]$Server, | |
| [String]$Database | |
| ) | |
| $sqlCmdUtil = "C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SQLCMD.EXE" | |
| Get-ChildItem $Path\*.sql | Sort-Object -Property Name | % { & $sqlCmdUtil -S $Server -d $Database -i $_.FullName -t 750 -l 600 } |
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
| #!/bin/bash | |
| # | |
| # check commit messages for semantic versioning tags | |
| REGEX="\\+semver:\\s?(breaking|major|feature|minor|fix|patch|none|skip)" | |
| DEFAULT_BRANCH=$(git symbolic-ref HEAD) | |
| ERROR_MSG="[POLICY] The commit message doesn't contains a semantic versioning tag" | |
| while read OLDREV NEWREV REFNAME ; do | |
| if [[ "${REFNAME}" != "${DEFAULT_BRANCH:=refs/heads/master}" ]]; then |
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.Generic; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| public static class TypeActivator | |
| { | |
| /// <summary> | |
| /// Returns an instance of type <typeparamref name="TInstance"/> on which the method is invoked. | |
| /// </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
| using System; | |
| using System.Linq.Expressions; | |
| using System.Reflection; | |
| using System.Collections.Concurrent; | |
| public class ReflectionUtilities | |
| { | |
| private static readonly LockingConcurrentDictionary<PropertyInfo, Func<object, object>> getterCache; | |
| private static readonly LockingConcurrentDictionary<PropertyInfo, Action<object, object>> setterCache; |
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 Microsoft.AspNetCore.JsonPatch; | |
| using Microsoft.AspNetCore.JsonPatch.Operations; | |
| using Newtonsoft.Json.Linq; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| //Based on this: https://blog.abodit.com/posts/2014-05-json-patch-c-implementation/ | |
| public static class JsonPatchDocumentDiff | |
| { |
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 Microsoft.AspNetCore.Http; | |
| using Microsoft.AspNetCore.Mvc; | |
| public class FailedPreconditionObjectResult : ObjectResult | |
| { | |
| public FailedPreconditionObjectResult(string detail) | |
| : base(detail) | |
| => StatusCode = StatusCodes.Status412PreconditionFailed; | |
| } |
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 Microsoft.AspNetCore.Http; | |
| using Microsoft.AspNetCore.Mvc; | |
| public class ConflictObjectResult : ObjectResult | |
| { | |
| public ConflictObjectResult(string detail) | |
| : base(detail) | |
| => StatusCode = StatusCodes.Status409Conflict; | |
| } |
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.IO; | |
| public sealed class TempDirectory : IDisposable | |
| { | |
| private string _path; | |
| public TempDirectory() | |
| : this(System.IO.Path.GetTempFileName()) | |
| { |
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
| #!/bin/bash | |
| # Based on: https://github.com/brianstorti/git-hooks/blob/master/hooks/post-merge | |
| exec < /dev/tty | |
| # Merge can go three ways: | |
| # * F: fast forward: no commit is created, only a ref is changed | |
| # * A: automatic: true merge (non-ff) without conflicts. A new commit is created | |
| # * C: merge with conflicts: no commit is created but the index is prepared (partially) |
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
| [alias] | |
| co = checkout | |
| sw = switch | |
| st = status | |
| unstage = reset HEAD -- | |
| last = log -1 HEAD | |
| cln = clean -n | |
| clf = clean -f | |
| cli = clean -i | |
| clfx = clean -fx |