View read-azure-app-perm.ps1
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
##based on https://github.com/12Knocksinna/Office365itpros/blob/master/ReportPermissionsApps.PS1 | |
# | |
# ReportPermissionsApps.PS1 | |
# A script using Azure Automation and a managed identity to scan for apps assigned high-priority permissions and report them | |
# for administrator review | |
##install graph PS | |
Install-Module Microsoft.Graph -Scope CurrentUser | |
#Connect-AzAccount -Identity |
View petool.sh
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
#PE Tools on container | |
# 1. Downlaod IBM FileNet Process Engine >> PE Java API from ACCE | |
# 2. also CE for jace.jar | |
#create jre or jdk pod | |
kind: Pod | |
apiVersion: v1 | |
metadata: | |
name: tilo-jdk-pod |
View shaw-compress.sh
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
##for PDF invoices with filename like ShawInvoice_01412345678_01Apr2022.pdf | |
for file in Shaw*.pdf | |
do | |
echo "$(date +"%F_%s") Start $file" | |
filedate=$(basename "$file" .pdf | tail -c 10) | |
outFdate=$(date -d $filedate +"%F") | |
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook -sOutputFile=${outFdate}_${file} $file | |
echo "$(date +"%F_%s") Done $file" | |
done |
View GenPDFfiles-PDFsharp.ps1
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
## the PDF | |
$ExecuteStarTime = get-date | |
Add-Type -Path .\PdfSharp.dll #### got PdfSharp.dll from ngut download https://www.nuget.org/packages/PdfSharp/ (open with 7zip) | |
$img = [PdfSharp.Drawing.XImage]::FromFile("C:\test-trex-fs-root\TILOPDF\TSOsou\dummy.png") | |
##now loop | |
10001..10500 | % { | |
$doc = New-Object PdfSharp.Pdf.PdfDocument | |
$doc.Info.Title = "Content File $($_)" | |
$doc.Info.Author = "$($env:username)" | |
$doc.Info.Subject = "This is Test Content File" |
View GenPDFfiles.ps1
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
#################createPrinter | |
# choose a name for your new printer | |
$printerName = 'PrintPDFUnattended' | |
# choose a default path where the PDF is saved | |
$PDFFilePath = "C:\PrinterTemp\PDFResultFile.pdf" | |
New-Item $PDFFilePath -type file -Force | |
# add printerPort | |
Add-PrinterPort -Name $PDFFilePath | |
# add printer | |
Add-Printer -DriverName "Microsoft Print to PDF" -Name $printerName -PortName $PDFFilePath |
View icn-curl-example.sh
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
iamURL="cp-console.apps.ocp6.tsodev.com" | |
cpdURL="cpd-alf1.apps.ocp6.tsodev.com" | |
userid="cp4baadmin" | |
userpw="mypass123" | |
##now in chain | |
iamToken=$(curl -b icncookie.txt -c icncookie.txt -k -s -X POST -H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" -d "grant_type=password&username=$userid&password=$userpw&scope=openid" https://$iamURL/idprovider/v1/auth/identitytoken | jq '.access_token' | xargs) | |
echo $iamToken |
View check-res.sh
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
#!/bin/bash | |
##from https://ops.tips/gists/measuring-http-response-times-curl/ | |
##mod by allow self sign cert (-k) | |
# Set the `errexit` option to make sure that | |
# if one command fails, all the script execution | |
# will also fail (see `man bash` for more | |
# information on the options that you can set). | |
set -o errexit |
View get-fn-addon-viajs.js
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
importClass(java.lang.System); | |
function OnCustomProcess (CEObject) | |
{ | |
var objStor = CEObject.getObjectStore(); | |
objStor.refresh(); | |
var myDomain = objStor.get_Domain(); | |
myDomain.refresh(); | |
var AddOnListIterator = myDomain.get_AddOns().iterator(); | |
var output = ""; |
View fix-bitrate.ps1
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
#PS use shell.azure.com | |
Connect-MicrosoftTeams -UseDeviceAuthentication | |
##use browser to login | |
##check value | |
Get-CsTeamsMeetingPolicy | select Identity, WhoCanRegister, MediaBitRateKb , RecordingStorageMode | |
##set to new value | |
Set-CsTeamsMeetingPolicy -Identity Global -MediaBitRateKb 50001 | |
###output: | |
PS /home/tilo> Get-CsTeamsMeetingPolicy | select Identity, WhoCanRegister, MediaBitRateKb , RecordingStorageMode |
View log4j2-azure-log-mon.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
<RollingFile name="VFLOGMON" | |
filePattern="${sys:log.dir}/VFLOGMON/MyFlow-LogMon-%d{yyyy-MM-dd}-%i.log" | |
immediateFlush="true"> | |
<PatternLayout alwaysWriteExceptions="false" | |
pattern="%d %-5p [%t] %C{2} (%F:%L) - %enc{%m}{CRLF} %replace{%throwable}{[\r|\n]}{|}%n"/> | |
<Policies> | |
<TimeBasedTriggeringPolicy interval="1" | |
modulate="true"/> | |
<SizeBasedTriggeringPolicy size="22 MB"/> | |
</Policies> |
NewerOlder