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
# clone-display.ps1 | |
# | |
# Test with CIM if there are Multiple Montiors Connected and | |
# try for 60 seconds to Switch Display to Clone/Presentation Mode | |
# | |
# Set WriteDebugLogEnabled to $true if for some diagnostic logging | |
# Register Schedule Task | |
# $Trigger= New-ScheduledTaskTrigger -AtLogon | |
# $TaskPrincipal = New-ScheduledTaskPrincipal -GroupId $((Get-LocalGroup -SID "S-1-5-32-545").name) |
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
# have fun with this shit code | |
# Somebody already thit this better | |
$ffmpeg_executable_path = ".\ffmpeg-4.4-full_build\ffmpeg-4.4-full_build\bin\ffmpeg.exe" | |
$maximum_parallel_executions = 5 | |
$input_folder = @( | |
".\input1", | |
".\input2" | |
) | |
$output_folder = ".\output" |
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
156.32.34.1 | |
126.33.4.3 |
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
id: 5e95b45d9bdf2a01660647c2 | |
status: failed | |
parameters: None | |
result: | |
error: "u'{"values": [{"test1": "test1", "test2": 1, "datestr": "2020-04-14T13:02:21.824846"}]}' is not of type 'object' | |
Failed validating 'type' in schema: | |
{'additionalProperties': False, | |
'properties': {u'values': {u'items': {u'datestr': {u'type': u'string'}, | |
u'test1': {u'type': u'string'}, |
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
- name: "Ensure Tomcat AJP Connector on Port 8009 is Disabled" | |
win_lineinfile: | |
path: "c:/temp/server.xml" | |
regex: '^(\s*)(<Connector port="8009" protocol="AJP\/1\.3" redirectPort="8443" \/>)' | |
backrefs: true | |
line: '$1<!-- $2 -->' |
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
from __future__ import (absolute_import, division, print_function) | |
__metaclass__ = type | |
import logging | |
import json | |
from ansible.plugins.inventory import BaseInventoryPlugin, Constructable, Cacheable | |
class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): |
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
# Start the Terminal Application on Logon | |
# Automatic Restart Terminal Application on Crash | |
Param([String]$Path, [String]$ProcessName="MenuePlan.Terminal.UI", [String]$LogFile="generateme") | |
$defaultLogRootPath = "c:/temp"; # Define the Default Directory for Log Files | |
$InstantCrashCounter = 5; # Ammount of Instant Crashes before we stop restarting Application | |
$secondForDetectingInstantCrash = 60; # Define when a Instant Crash happen in Seconds | |
if($Path -eq "") |
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
$comPort = "COM5" | |
class SerialCommunicator | |
{ | |
hidden [int] $WaitTimeForResponse=1 # Wait Time for Response in Seconds | |
hidden [int] $ComPortBaudRate=9600; | |
hidden [System.IO.Ports.Parity] $ComPortParity = [System.IO.Ports.Parity]::None; | |
hidden [int] $ComPortDataBits=8; | |
hidden [int] $ComPortStopBits=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
# Epic Akward Powershell Cleanup for Docker images | |
# Get Docker Images with <None> in Line and return the a List of Image Ids | |
docker images --no-trunc | ?{ $_ -match "<none>" } | % { ($_ -split '\s+|\t+')[2]} | %{ ($_ -split ':')[1]} | |
# Do the Same with Cleanup | |
docker rmi $(docker images --no-trunc | ?{ $_ -match "<none>" } | % { ($_ -split '\s+|\t+')[2]} | %{ ($_ -split ':')[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
function Get-NetAdapterDriver(){ | |
param($Computer=".") | |
$NetworkAdapters = Get-WmiObject -Query "Select * from Win32_NetworkAdapter" -ComputerName $Computer | |
$Drivers = Get-WmiObject -Query "Select * from Win32_PnPSignedDriver where DeviceClass = 'net'" -ComputerName $Computer | |
$output = New-Object System.Collections.ArrayList | |
foreach($NetworkAdapter in $NetworkAdapters) | |
{ | |
foreach($Driver in $Drivers){ | |
if($Driver.FriendlyName -eq $NetworkAdapter.Name) |
NewerOlder