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
# # Install visual c++ 2012 SP1 redistributable package | |
Invoke-WebRequest "http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU1/vcredist_x64.exe" -OutFile "C:\vcredist.exe" -UseBasicParsing; | |
Start-Process "C:\vcredist.exe" -ArgumentList '/install', '/passive' -NoNewWindow -Wait; | |
rm "C:\vcredist.exe" | |
# Install Service Fabric Runtime | |
Invoke-WebRequest "http://download.microsoft.com/download/3/2/1/3217654F-6882-4CEA-BD51-49287EDECE9B/MicrosoftServiceFabric.6.0.232.9494.exe" -OutFile "C:\ServiceFabricRuntime.exe" -UseBasicParsing; | |
Start-Process "C:\ServiceFabricRuntime.exe" -ArgumentList '/AcceptEULA', '/QUIET' -NoNewWindow -Wait; | |
rm "C:\ServiceFabricRuntime.exe" |
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
import {Injectable} from '@angular/core'; | |
import {Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot} from '@angular/router'; | |
import {AuthService} from '../services/auth.service'; | |
@Injectable() | |
export class RouteGuard implements CanActivate { | |
constructor( | |
private router: Router, | |
private auth: AuthService |
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; | |
using System.IO; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Web; | |
namespace RealID.API.Helpers | |
{ | |
/// <summary> |
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; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Text.RegularExpressions; | |
public class PropertyFunctionProvider |
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
function Invoke-SqlCommand() { | |
[cmdletbinding(DefaultParameterSetName="integrated")]Param ( | |
[Parameter(Mandatory=$true)][Alias("Serverinstance")][string]$Server, | |
[Parameter(Mandatory=$true)][string]$Database, | |
[Parameter(Mandatory=$true, ParameterSetName="not_integrated")][string]$Username, | |
[Parameter(Mandatory=$true, ParameterSetName="not_integrated")][string]$Password, | |
[Parameter(Mandatory=$false, ParameterSetName="integrated")][switch]$UseWindowsAuthentication = $true, | |
[Parameter(Mandatory=$true)][string]$Query, | |
[Parameter(Mandatory=$false)][int]$CommandTimeout=0 | |
) |
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
function Get-Downloader { | |
param ( | |
[string]$url | |
) | |
$downloader = new-object System.Net.WebClient | |
$defaultCreds = [System.Net.CredentialCache]::DefaultCredentials | |
if ($defaultCreds -ne $null) { | |
$downloader.Credentials = $defaultCreds |
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 AbCap.Digital.ApiGateway.ContainerBase.Compression; | |
using AbCap.Digital.ApiGateway.ContainerBase.Configuration; | |
using AbCap.Digital.ApiGateway.ContainerBase.Encryption; | |
using AbCap.Digital.ApiGateway.ContainerBase.Extentions; | |
using AbCap.Digital.ApiGateway.ContainerBase.Model; | |
using AbCap.Digital.ApiGateway.ContainerBase.Model.Message.Request; | |
using AbCap.Digital.ApiGateway.ContainerBase.Model.Message.Response; | |
using AbCap.Digital.ApiGateway.ContainerBase.Request; | |
using AbCap.Digital.ApiGateway.ContainerBase.Request.Enumerations; | |
using AbCap.Digital.ApiGateway.ContainerBase.Serializers; |
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
function registerCertificate( | |
[System.Security.Cryptography.X509Certificates.StoreName]$storeName, | |
[string]$certPath, | |
[string]$pfxPass | |
) | |
{ | |
$pfx = new-object System.Security.Cryptography.X509Certificates.X509Certificate2 | |
$keyStorageFlags = [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable -bxor [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::MachineKeySet -bxor [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::PersistKeySet; | |
$pfx.import($certPath,$pfxPass,$keyStorageFlags) | |
$store = new-object System.Security.Cryptography.X509Certificates.X509Store( |
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
$downloadfolder = "C:\npmupload\" | |
$scopes = gc ".\.npmrc" | %{ $_.Split(':')[0]} | |
$packageJson = gc ".\package.json" -Raw | ConvertFrom-Json -Verbose | |
$packages = $packageJson.dependencies | Get-Member | ?{$scopes -contains $_.Name.Split('/')[0]} | %{$_.Name} | |
$urls = $packages | %{ &npm view $_ dist.tarball} | |
$account = [System.Net.CredentialCache]::DefaultCredentials | |
$client = New-Object System.Net.WebClient | |
$client.Credentials = $account |
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
param ( | |
[Parameter(Mandatory=$true)] [System.Uri] | |
$Uri, | |
[Parameter()] [Switch] | |
$UseSystemProxy, | |
[Parameter()] [Switch] | |
$UseDefaultCredentials | |
) | |
$request = [System.Net.WebRequest]::Create($Uri) | |
if ($UseSystemProxy) { |