Skip to content

Instantly share code, notes, and snippets.

View schittli's full-sized avatar

Tom-- schittli

  • Biel / Bienne, Switzerland
  • 08:08 (UTC +02:00)
View GitHub Profile
@simg
simg / unit_auto_replace.lua
Created January 23, 2025 16:15
Beyond All Reason - Unit Auto Replacer widget
---@diagnostic disable: duplicate-set-field
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
-- file: unit_auto_replace.lua
-- brief: Automatically replaces units and replicates their orders if they are destroyed
-- author: Simon Gardner
--
-- Copyright (C) 2023.
@L-e-x-o-n
L-e-x-o-n / cmd_improved_area_reclaim.lua
Last active May 4, 2025 09:23
Easier and smarter area unit reclaim orders, priority system by team and unitdef
function widget:GetInfo()
return {
name = "Improved unit area reclaim",
desc = "Easier and smarter area unit reclaim orders, priority system by team and unitdef",
author = "Lexon",
date = "17.07.2022",
version = 1.1,
license = "GNU GPL, v2 or later",
layer = 10,
enabled = true -- loaded by default?
@yewtudotbe
yewtudotbe / what-happened-downtime-july2023.md
Last active April 21, 2026 18:27
Why yewtu.be was down? (July 2023)

On the 30th of June, my cloud provider, Oracle Cloud, decided to shutdown all my servers hosted on two Oracle Cloud accounts.
It is known that this provider will randomly ban accounts without any reason.

Why yewtu.be doesn't accept new registrations nor logging into an account?

Unfortunately and this is 100% my fault for forgetting that, I only had data duplication between servers located in the two Oracle Cloud accounts and no backups.
I thought that I wouldn't get all my accounts in trouble at the same time and able to recover the data from one of the two accounts but unfortunately this turned out otherwise.

Implementing some backup was something I had in my notes for a long time but I think I forgot about it, maybe due to the huge amount of work I spend on the open source projects.
I'm deeply sorry if you have lost your subscriptions list or playlists or watch history. I did try to contact Oracle Cloud for recovering the data, I'm waiting for their answer but you should be certain that they

@likamrat
likamrat / WinGet_WinSrv.ps1
Created February 13, 2023 00:41
Installing Winget om Windows Server 2019/2022
Write-Information "This script needs be run on Windows Server 2019 or 2022"
If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" }
# Define environment variables
$downloadDir = "C:\WinGet"
$gitRepo = "microsoft/winget-cli"
$msiFilenamePattern = "*.msixbundle"
$licenseFilenamePattern = "*.xml"
$releasesUri = "https://api.github.com/repos/$gitRepo/releases/latest"
@PanosGreg
PanosGreg / Encrypt-Decrypt-WithDotNet.ps1
Last active April 1, 2024 17:13
Encryption & Decryption using native .NET classes
## Encryption & Decryption using native .NET functions
## This is Symetrical encryption. Which means the same key is used to both encrypt and decrypt.
## The encryption method is based on AES 256bit.
## The major difference between this option and the ConvertFrom/To-SecureString functions
## is that this way produces much smaller encrypted files.
## I have not compared the 2 options in regards to performance though, as-in which one is faster.
@gioxx
gioxx / O365LicenseFriendlyName.txt
Created March 7, 2022 10:38
Una lista di mappatura tra licenze Office 365 (SkuPartNumber via PowerShell) e nome più amichevole (la base è stata curata da https://o365reports.com/2021/11/23/office-365-license-reporting-and-management-using-powershell, in seguito modificata da me) - https://gioxx.org
AAD_BASIC= Azure Active Directory Basic
AAD_PREMIUM= Azure Active Directory Premium
AAD_PREMIUM_P1= Azure Active Directory Premium P1
AAD_PREMIUM_P2= Azure Active Directory Premium P2
ADALLOM_O365= Office 365 Advanced Security Management
ADALLOM_STANDALONE= Microsoft Cloud App Security
ADALLOM_S_O365= POWER BI STANDALONE
ADALLOM_S_STANDALONE= Microsoft Cloud App Security
ATA= Azure Advanced Threat Protection for Users
ATP_ENTERPRISE= Exchange Online Advanced Threat Protection
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active June 17, 2026 08:05
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
function PNValidate {
$Results = [PSCustomObject]@{
Spooler = $null
PatchInstalled = $false
RestrictDriverInstallationToAdministrators = $null
NoWarningNoElevationOnInstall = $null
UpdatePromptSettings = $null
Exploitable = $true
Explanation = $null
}
@maxkoshevoi
maxkoshevoi / download-latest-release.ps1
Created April 9, 2021 18:05
Download latest GitHub release via Powershell
$repoName = "PowerShell/PowerShell"
$assetPattern = "*-win-x64.msi"
$extractDirectory = "C:\Users\Public\Downloads"
$releasesUri = "https://api.github.com/repos/$repoName/releases/latest"
$asset = (Invoke-WebRequest $releasesUri | ConvertFrom-Json).assets | Where-Object name -like $assetPattern
$downloadUri = $asset.browser_download_url
$extractPath = [System.IO.Path]::Combine($extractDirectory, $asset.name)
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,