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
| // Based on https://itnext.io/better-typescript-support-for-jasmine-20dc7454ba94 | |
| import { Pipe, Type } from '@angular/core'; | |
| import { TestBed } from '@angular/core/testing'; | |
| export type Spied<T> = T & { [Method in keyof T]: jasmine.Spy }; | |
| export function spyOnClass<T>(spiedClass: Type<T>): Spied<T> { | |
| const prototype = spiedClass.prototype; | |
| let methodNames = Object.getOwnPropertyNames(prototype) |
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
| /* | |
| Lists all Stored Procedures and functions in the current database, along with Tables_referenced and parameters | |
| NOTE: | |
| These may be be some false matches for Table_Referenced | |
| (for example: when a table name is a substring of another table name) | |
| You can qualify the database names to find references in sprocs for tables in another database (on same server or using linked servers) | |
| */ | |
| SELECT Server_Name = @@SERVERNAME, | |
| Database_Name = Routine_Catalog, |
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
| /* | |
| -- Lists all tables in the current database, including which procedures in the database reference these tables | |
| NOTES: | |
| There may be some false matches for Table_Name in the Referenced_by procedures | |
| (for example: when a table name is a substring of another table name) | |
| You can qualify the database names to find references in sprocs for tables in another database (on same server or using linked servers) | |
| */ | |
| SELECT Server_Name = @@SERVERNAME, |
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
| # Run the rest in the boxstarter shell | |
| Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
| Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Confirm | |
| # From https://gist.github.com/flcdrg/87802af4c92527eb8a30 | |
| # This will install NuGet module if missing | |
| Get-PackageProvider -Name NuGet -ForceBootstrap | |
| # PowerShellGet. Do this early as reboots are required | |
| if (-not (Get-InstalledModule -Name PowerShellGet -ErrorAction SilentlyContinue)) { |