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.Linq; | |
using StructureMap; | |
namespace ConsoleApplication1 | |
{ | |
/// <summary> | |
/// See http://stackoverflow.com/questions/6777671/setting-up-structure-map-in-a-c-sharp-console-application | |
/// Updated for SM 4: http://ardalis.com/using-structuremap-4-in-a-console-app | |
/// </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
function Reverse-String { | |
param( | |
[string]$instr | |
) | |
$chars = $instr.ToCharArray() | |
[array]::Reverse($chars) | |
$chars -join "" | |
} |
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
node { | |
stage('Создание пустой базы и обновление из хранилища') { | |
env.RUNNER_V8VERSION='8.3.10.2505' | |
env.RUNNER_IBNAME="/F${env.WORKSPACE}/build/ib" | |
cmd("runner init-dev --storage --storage-name tcp://storage.local/master --storage-user Мороз") | |
} | |
stage('Проверка логической целостности конфигурации') { | |
cmd_failsafe('runner checkconfig --junitpath build/out/ConfigLogIntegrity.xml --mode -ConfigLogIntegrity') | |
step([$class: 'JUnitResultArchiver', testResults: '**/ConfigLogIntegrity.xml']) |
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
// see PowerShell Remoting on Python at https://www.bloggingforlogging.com/2018/08/14/powershell-remoting-on-python/ | |
// see https://github.com/jborean93/pypsrp | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
// NB you should add reference to C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0\System.Management.Automation.dll (this is installed by the Windows SDK). |
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 copy-deployable-web-files($proj_path, $deploy_dir) { | |
# copy files where Build Action = "Content" | |
$proj_dir = split-path -parent $proj_path | |
[xml]$xml = get-content $proj_path | |
$xml.Project.ItemGroup | % { $_.Content } | % { $_.Include } | ? { $_ } | % { | |
$from = "$proj_dir\$_" | |
$to = split-path -parent "$deploy_dir\$_" | |
if (!(test-path $to)) { md $to } | |
cp $from $to | |
} |
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.Collections.ObjectModel; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Management.Automation; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; |
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
## FYI: These scripts are now maintained in a proper repository: | |
## https://github.com/alastairtree/deploy-websites-with-powershell | |
## Intro: Simple powershell script to install (or replace) a local website and app pool | |
## Usage: CreateSite.ps1 [WebsiteName] [AppPoolName] [Port] [Path] ([domain\user] [password]) | |
## Note : These scripts require local admin priviliges! | |
# Load IIS tools | |
Import-Module WebAdministration | |
sleep 2 #see http://stackoverflow.com/questions/14862854/powershell-command-get-childitem-iis-sites-causes-an-error |
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
# Remove the /all if you receive any errors | |
& dism /online /get-features | more | |
& dism /online /enable-feature /FeatureName:IIS-CertProvider /all | |
& dism /online /enable-feature /FeatureName:IIS-WindowsAuthentication /all | |
& dism /online /enable-feature /FeatureName:IIS-ClientCertificateMappingAuthentication /all | |
& dism /online /enable-feature /FeatureName:IIS-StaticContent /all | |
& dism /online /enable-feature /FeatureName:IIS-DefaultDocument /all | |
& dism /online /enable-feature /FeatureName:IIS-WebSockets /all |
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
#requires -version 7.0 | |
$am = @" | |
_____ __ __ ___ _ __ ______ | |
/ ___/__ ___ ___/ / / |/ /__ _______ (_)__ ___ _ __ / /__ / _/ _/ | |
/ (_ / _ \ _ \ _ / / /|_/ / _ \/ __/ _ \/ / _ \ _ `/ / // / -_) _/ _/ | |
\___/\___\___\_,_/ /_/ /_/\___/_/ /_//_/_/_//_\_, ( ) \___/\__/_//_/ | |
/___/|/ | |
"@ |
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
#requires -version 5.1 | |
#requires -module PowerShellGet | |
<# | |
The function assumes you have git installed and use it for source control | |
This code contains hard-coded references for my environment. This file | |
is offered as educational and reference material. It will not run for you | |
without revision. |
NewerOlder