View request_emarsys_api.ps1
# change this for the emarsys request
$username = "username001"
$secret = "secret"
$url = "https://trunk-int.s.emarsys.com/api/v2/field/translate/de"
#$url = "https://trunk-int.s.emarsys.com/api/v2/settings"
View merge_csv_files.ps1
################################################
#
# PREPARATION / ASSEMBLIES
#
################################################
# Load scriptpath
if ($MyInvocation.MyCommand.CommandType -eq "ExternalScript") {
$scriptPath = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition
View readme.md

First

  • Install the app "Sports DV" and change WiFi SSID and password

URLs

  • Wifi and Cam settings are seperated and have different port numbers.
  • Wifi-Settings (just login withoug username and password): http://192.168.25.1
  • Cam LiveStream: http://192.168.25.1:8080/?action=stream
  • Not sure how the configuration is made really... Would need a Man-In-The-Middle-Attack or send the initial ICMP package

Change AP (Cam is the access point) to Station (Cam is a normal WiFi Client)

View regex.ps1
# the task is to match everything between SELECT and FROM
$string = "SELECT abc FROM def"
$pattern = '(?<=SELECT\s)(.*)(?=\sFROM)'
# search for pattern and output it
$string | Select-String $pattern -AllMatches | % {$_.Matches}| % {$_.Value}
# replace the match with something else
$string -replace $pattern, 'xyz'
View replace.ps1
# with parsing of csv
$inputfile = "Datentabelle 3.txt"
$outputfile = "export.csv"
$inputdelim = "`t"
$outputdelim = ','
$inputenc = "UTF8"
$outputenc = "UTF8"
rm $outputfile
View press_enter.ps1
$NULL = Read-Host "Press enter to exit"
View change_certificate,ps1
# copy the certificate from "Web Hosting\Certificates" to "Personal\Certificates" and then execute this command with changed "<FINGERPRINT>"
# note: the SHA1 fingerprint should be without spaces and with capital letters
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="<FINGERPRINT>"
View aws_s3.ps1
<#########################
LINKS
#########################>
<#
resource: https://devops.profitbricks.com/api/s3/
View use_gecko.ps1
# list enumns
# [enum]::getValues([type]"System.Windows.Forms.DockStyle")
# get value of enum entry
# [System.Windows.Forms.DockStyle]::Fill.value__
# enum link https://blogs.technet.microsoft.com/heyscriptingguy/2015/08/27/working-with-enums-in-powershell-5/
cd "C:\FastStats\Build\salesforce\preload\"
View filewatcher.ps1
# show file events like in https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
$fi = New-Object -Type System.IO.FileSystemWatcher
$fi | gm -type Event | Select Name