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
| # Check the working directory for modified files | |
| # Exit with an error if there are any | |
| $modified = git ls-files --modified | |
| if ($modified -ne $null) { | |
| Write-Error "Working directory contains modified files: $modified" | |
| exit 1 | |
| } |
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
| import { Plugin, PluginContext } from 'rollup'; | |
| import { createFilter } from 'rollup-pluginutils'; | |
| import { | |
| parse, | |
| compileTemplate, | |
| TemplateCompileResult | |
| } from '@vue/component-compiler-utils'; | |
| import { VueTemplateCompiler } from '@vue/component-compiler-utils/dist/types'; | |
| import { | |
| ObjectExpression, |
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
| private static (BigInteger, BigInteger) RecoverPrimeFactors(BigInteger n, BigInteger e, BigInteger d) | |
| { | |
| // Inspired by https://www.di-mgt.com.au/rsa_factorize_n.html | |
| var k = BigInteger.Subtract(BigInteger.Multiply(d, e), BigInteger.One); | |
| var primes = new List<int> | |
| { | |
| 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, | |
| 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, | |
| 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, | |
| 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, |
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
| Compare-Object ` | |
| -ReferenceObject (git ls-files | Resolve-Path -Relative | Sort-Object) ` | |
| -DifferenceObject (Get-ChildItem -Recurse -File | Resolve-Path -Relative | Sort-Object) ` | |
| -CaseSensitive ` | |
| -SyncWindow 0 |
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
| # first install Git 2.16+ | |
| # https://git-scm.com/download/win | |
| git --version | |
| # (optional) reset machine settings because per-machine config makes no sense in team projects | |
| # the default (when not set) for core.autocrlf is false (no eol conversions) | |
| git config --unset core.autocrlf | |
| git config --unset core.safecrlf | |
| git config --unset core.eol |
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
| public class ES6ModulesHttpModule : IHttpModule | |
| { | |
| public void Dispose() | |
| { | |
| } | |
| public void Init(HttpApplication context) | |
| { | |
| context.BeginRequest += ContextOnBeginRequest; | |
| } |
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
| export class Hero { | |
| id: number; | |
| name: string; | |
| superpower: Power; | |
| friends: Hero[]; | |
| } | |
| export class Power { | |
| name: string; | |
| } |
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
| //Git Mergetool and difftool with Beyond Compare 4 | |
| //For Windows | |
| //IF running this command in git bash then escape $ with \ | |
| git config --global diff.tool bc4 | |
| git config --global difftool.bc4.cmd "\"C:/Program Files/Beyond Compare 4/BCompare.exe\" \"\$LOCAL\" \"\$REMOTE\"" | |
| git config --global difftool.prompt false | |
| git config --global merge.tool bc4 | |
| git config --global mergetool.bc4.cmd "\"C:/Program Files/Beyond Compare 4/BCompare.exe\" \"\$LOCAL\" \"\$REMOTE\" \"\$BASE\" \"\$MERGED\"" | |
| git config --global mergetool.bc4.trustExitCode true |
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
| git config --global alias.co checkout | |
| git config --global alias.br branch | |
| git config --global alias.ci commit | |
| git config --global alias.st status | |
| git config --global alias.last "log -1 HEAD" | |
| git config --global alias.ff "merge --ff-only" | |
| git config --global alias.root "rev-parse --show-toplevel" | |
| git config --global alias.done "branch --format=\"%(if:equals=gone)%(upstream:track,nobracket)%(then)%(refname:short)%(end)\"" | |
| git config --global alias.doing "branch --format=\"%(if:notequals=)%(upstream)%(then)%(refname:short)%(end)\"" | |
| git config --global alias.todo "branch --format=\"%(if:equals=)%(upstream)%(then)%(refname:short)%(end)\"" |