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]$Prompt | |
) | |
if (-not $Prompt) { | |
$Prompt = "" | |
while ($true) { | |
$line = Read-Host ">" | |
if (-not $line) { break } | |
$Prompt += $line + "`n" |
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
2024-09-26 18:58:38 - ############################### | |
2024-09-26 18:58:38 - wget already present .... | |
2024-09-26 18:58:38 - ############################### | |
2024-09-26 18:58:38 - Performing version check... | |
--2024-09-26 18:58:38-- https://github.com/FreePBX/sng_freepbx_debian_install/raw/master/sng_freepbx_debian_install.sh |
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
Add-Type -AssemblyName PresentationFramework | |
$inputXAML=Get-Content -Path "$PSScriptRoot\gui.xaml" -Raw | |
$inputXAML=$inputXAML -replace 'mc:Ignorable="d"','' -replace "x:N","N" -replace '^<Win.*','<Window' | |
[XML]$XAML=$inputXAML | |
$xamlReader = (New-Object System.Xml.XmlNodeReader $XAML) | |
$window = [Windows.Markup.XamlReader]::Load($xamlReader) | |
$window.ShowDialog() |
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]$dllname) | |
Add-Type -Path "$dllname" | |
$classes = [System.Reflection.Assembly]::LoadFile("$dllname").GetTypes() | Where-Object {$_.IsClass} | |
foreach ($class in $classes) { | |
Write-Host "- Class: $($class.FullName)" | |
$fields = $class.GetFields() | |
if ($fields.Count -gt 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
# Get the file path | |
param( | |
[string]$filePath | |
) | |
$filePath = Resolve-Path -Path $filePath | |
# Ensure the file exists | |
if (-not (Test-Path $filePath)) { |
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]$pathToInsertableTemplate) | |
# Преобразуем путь к источнику в полный путь | |
$pathToInsertableTemplate = Resolve-Path -Path $pathToInsertableTemplate | |
# Получаем активный экземпляр Word | |
$msword = [System.Runtime.Interopservices.Marshal]::GetActiveObject("Word.Application") | |
# Сохраняем ссылку на активный документ | |
$activeDocument = $msword.ActiveDocument |
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]$findText, | |
[string]$replacewithText | |
) | |
$msword = [System.Runtime.Interopservices.Marshal]::GetActiveObject("Word.Application") | |
# https://learn.microsoft.com/ru-ru/office/vba/api/word.find.execute | |
$MatchCase = $false | |
$MatchWholeWord = $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
SELECT ?film ?filmLabel | |
WHERE { | |
?actor1 rdfs:label "Jennifer Aniston"@en. | |
?actor2 rdfs:label "Adam Sandler"@en. | |
?film wdt:P161 ?actor1, ?actor2. | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |
} |
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
libreoffice --writer --infilter="writer8_template" $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
Set-ExecutionPolicy Bypass |