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
| #!/usr/bin/env bash | |
| #Change these variables! | |
| NIC_NAME="eth0" | |
| DOCKER_ROUTING_INTERFACE_NAME="mymacvlan" | |
| DOCKERNETWORK_IP_ADDRESS="192.168.0.249/32" | |
| DOCKERNETWORK_IP_RANGE="192.168.0.64/26" | |
| sleep 15 #Do not rush things if executing during boot. This line is not mandatory and can be removed. |
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
| #$RemoteServer = Read-Host "Please provide destination to test" | |
| $DestinationHost = "" | |
| $SourceServers = "" #for multi servers: "server1", "server2", "server3" | |
| $PortList = "443" #for multi ports: "80, 443, 566" | |
| $PortType = "TCP" | |
| $localportqry = "`"E:\RPA Tools\PortQryUI\PortQry.exe`"" | |
| $PortArray = @() | |
| if ($PortType -eq "UDP") { $PortCmd = "-p UDP" } Else { $PortCmd = "-p TCP" } |
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
| <?xml version="1.0" encoding="UTF-16"?> | |
| <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
| <RegistrationInfo> | |
| <Date>2021-11-15T11:01:07.6898855</Date> | |
| <Author>Carol Ouellet</Author> | |
| <URI>\Backup Files</URI> | |
| <Description>Launch a task before rebooting/poweroff. This can be useful for task to be performed before Windows Update force reboot the PC</Description> | |
| </RegistrationInfo> | |
| <Triggers> | |
| <EventTrigger> |
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
| mknod /dev/ttyUSB0 c 188 0 | |
| insmod /usr/local/modules/usbserial.ko | |
| insmod /usr/local/modules/cp210x.ko |
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-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name ExtendedUIHoverTime -Value 20000 |
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
| using System; | |
| public class Program | |
| { | |
| public static void Main(string[] args) | |
| { | |
| DateTime start = new DateTime(2020, 12, 15); | |
| DateTime end = new DateTime(2021, 1, 20); | |
| System.Diagnostics.Debug.WriteLine(IsFullMonth(start, end)); | |
| System.Diagnostics.Debug.Close(); |
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 Test-PSOnePing | |
| { | |
| <# | |
| .SYNOPSIS | |
| Sends a ping (ICMP) to a computer | |
| .DESCRIPTION | |
| Sends a ping (ICMP) to a computer | |
| .EXAMPLE |
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
| $serverlist = "localhost", "127.0.0.1" #hosts to test FROM | |
| $target = "google.ca" | |
| $portlist = 8199, 8198, 8197 | |
| Write-Host "Target: $target" | |
| foreach ($s in $serverlist) { | |
| Write-Host "--------------------------" | |
| Invoke-Command -ComputerName $s -ScriptBlock { | |
| foreach ($p in $Using:portlist) { | |
| $connection = Test-NetConnection -ComputerName $Using:target -Port $p |
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 Listen-Port ($port=80){ | |
| <# | |
| .DESCRIPTION | |
| Temporarily listen on a given port for connections dumps connections to the screen - useful for troubleshooting | |
| firewall rules. | |
| .PARAMETER Port | |
| The TCP port that the listener should attach to | |
| .EXAMPLE |
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
| @echo off | |
| for /f "tokens=3 usebackq" %%s in (`query user ^ | find /i "%username%"`) do (tscon %%s /dest:console /password:xxx) |