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
function Get-CurrentRegistryValue ($path, $name) { | |
$value = Get-ItemProperty -Path $path -Name $name -ErrorAction SilentlyContinue | |
if ($value -ne $null) { | |
Write-Host "Current value of '$name': $($value.$name)" | |
} else { | |
Write-Host "The registry entry '$name' does not currently exist." | |
} | |
} | |
function Confirm-Change ($settingName, $path, $name, $value) { |
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
# Define the GitHub repository and release URL | |
$repo = "notepad-plus-plus/notepad-plus-plus" | |
$releaseUrl = "https://api.github.com/repos/$repo/releases/latest" | |
# Get the latest release information using the GitHub API | |
$releaseInfo = Invoke-RestMethod -Uri $releaseUrl | |
# Find the x64 installer asset | |
$installerAsset = $releaseInfo.assets | Where-Object { $_.name -like "*x64.exe" } |
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
$excelApp = New-Object -ComObject Excel.Application;` | |
$excelApp.DisplayAlerts = $false;` | |
Get-ChildItem -File -Filter '*.xlsx' | ForEach-Object { ` | |
$workbook = $excelApp.Workbooks.Open($_.FullName);` | |
$csvFilePath = $_.FullName -replace "\.xlsx$", ".xlsx.csv";` | |
<# If Microsoft.Office.Interop.Excel.XlFileFormat, try running from Visual Studio Developer Powershell #>` | |
$workbook.SaveAs($csvFilePath, [Microsoft.Office.Interop.Excel.XlFileFormat]::xlCSV);` | |
$workbook.Close();` | |
} |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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
#!/usr/bin/env python | |
""" | |
2022 update: | |
- recurse attached eml files | |
2020 update: | |
- More iterators, fewer lists | |
- Python 3 compatible | |
- Processes files in parallel | |
(one thread per CPU, but that's not really how it works) |
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
CREATE FUNCTION [dbo].[UDF_VALIDATE_VIN]( | |
@VIN varchar(MAX) | |
) | |
RETURNS @RESULT TABLE | |
( | |
IS_VALID BIT NOT NULL, | |
LENGTH_VALID BIT NOT NULL, | |
FORMAT_VALID BIT NOT NULL, | |
CHECKSUM_VALID BIT NOT NULL, | |
CHECK_DIGIT CHAR(1) NULL, |
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
17:36:28.294725 IP (tos 0x0, ttl 64, id 167, offset 0, flags [none], proto UDP (17), length 328) | |
0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 44:cb:8b:92:8a:85, length 300, xid 0x13ba5265, secs 1342, Flags [none] (0x0000) | |
Client-Ethernet-Address 44:cb:8b:92:8a:85 | |
Vendor-rfc1048 Extensions | |
Magic Cookie 0x63825363 | |
DHCP-Message Option 53, length 1: Discover | |
MSZ Option 57, length 2: 1500 | |
Parameter-Request Option 55, length 5: | |
Subnet-Mask, Time-Zone, Default-Gateway, Domain-Name-Server | |
SMTP |