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) |
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
| netsh wlan set hostednetwork mode=allow ssid=AdHocNetwork key=yourpassword | |
| netsh wlan start hostednetwork | |
| REM Then go enable the new hostednetwork network adapter |
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
| Timeout /t 5 | |
| reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Applets\SysTray" /v "Services" /t reg_dword /d 29 /f | |
| systray |
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
| List<string> list = new List<string>() { | |
| "Liverpool - 1", | |
| "Liverpool - 11", | |
| "Liverpool - 12", | |
| "Liverpool - 2", | |
| "West Kirby - 1", | |
| "West Kirby - 12", | |
| "West Kirby - 8" }; | |
| var sortedList = list.CustomSort().ToArray(); |