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-AppxPackage-DownloadLinks { | |
param( | |
[Parameter(Position=0)] | |
[string]$URL, | |
[Parameter(Position=1)] | |
[string]$ProductID, | |
[Parameter(Position=2)] | |
[string]$PackageFamilyName, | |
[Parameter(Position=3)] | |
[string]$CategoryID, |
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
@echo off | |
SETLOCAL EnableDelayedExpansion | |
for /f "tokens=* delims=" %%i in ('powershell -command "(Get-WmiObject -Class Win32_OperatingSystem).SystemDrive"') do set drive=%%i | |
for %%I in ("%~dp0") do set "cdrive=%%~dI" | |
if not "%cdrive%"=="%drive%" ( | |
copy "%~f0" "%PUBLIC%\%~nx0" | |
start /b /wait "" cmd /c "%PUBLIC%\%~nx0" | |
start /b "" cmd /c "%cdrive% && del /f /q "%~f0"" | |
exit /b | |
) |
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
#!/bin/bash | |
# | |
# Cloudflare DNS-Records updater script V1.4 | |
# Made by craeckor | |
# | |
# This script updates your Cloudflare DNS-Records. | |
# Requirements: bash, jq, curl and awk. | |
# API-Token (Not API-Key) is required. | |
# Only works for one specific Second Level Domain per script. (E.g example.com) Multiple subdomains are supported. |
This file has been truncated, but you can view the full file.
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
This file has been truncated, but you can view the full file.
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
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } |
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
#-------------------------------------------------------------------------------------------------------------- | |
#-- Script to run query and get recordset | |
#-- Credits: SomTripathi --> https://gist.github.com/SomTripathi/651fd287250ad013720f | |
#-------------------------------------------------------------------------------------------------------------- | |
function Run-Query( [string]$InstanceName , [string]$DatabaseName, [string]$Query, [string]$Username, [string]$Password) | |
{ | |
$SQLInstance = $InstanceName | |
$DBName = $DatabaseName |
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
@echo off | |
setlocal enabledelayedexpansion | |
set header=-H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" -H "Accept-Language: en-US,en;q=0.5" -H "Connection: keep-alive" -H "Pragma: no-cache" -H "Cache-Control: no-cache" | |
set repo=PowerShell/PowerShell | |
for /f "tokens=7 delims=/" %%i in ('curl -s !header! -I "https://github.com/!repo!/releases/latest" 2^>^&1 ^| findstr "Location:"') do ( | |
set tag=%%i | |
) | |
echo !tag! | |
endlocal | |
pause |