Skip to content

Instantly share code, notes, and snippets.

View supermarsx's full-sized avatar
👾

supermarsx

👾
  • Portugal
  • 10:07 (UTC +01:00)
View GitHub Profile
@supermarsx
supermarsx / Startup-Script.ps1
Created April 28, 2024 19:28
Windows Sandbox startup script example, several different functions
param (
[Parameter()]
[int]$BackupTaskBar
)
Add-Type -AssemblyName System.Windows.Forms
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class Win32 {
@supermarsx
supermarsx / SpecialSandboxExample.wsb
Last active April 28, 2024 17:40
Windows Sandbox configuration example
<Configuration>
<VGpu>Enable</VGpu>
<Networking>Enable</Networking>
<AudioInput>Disable</AudioInput>
<VideoInput>Disable</VideoInput>
<PrinterRedirection>Disable</PrinterRedirection>
<ProtectedClient>Enable</ProtectedClient>
<ClipboardRedirection>Enable</ClipboardRedirection>
<MemoryInMB>2048</MemoryInMB>
<MappedFolders>
@supermarsx
supermarsx / EnablePhotoViewer.reg
Created April 27, 2024 23:30
Activate Windows Photo Viewer on Windows 10
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll]
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell]
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open]
"MuiVerb"="@photoviewer.dll,-3043"
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command]
@supermarsx
supermarsx / nginx.conf
Created April 27, 2024 22:26
Nginx return 200 it works page on 403 error
error_page 403 =200 /virtual403.html;
location = /virtual403.html {
add_header Content-Type text/plain;
root /data/nginx/default_www;
return 200 '<h1>It works!</h1>';
}
@supermarsx
supermarsx / grub.cfg
Last active April 28, 2024 17:41
Grub bootloader arguments to support IOMMU, pci passthrough
"quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifuntion │ nofb nomodeset"
@supermarsx
supermarsx / YealinkOpenVpnConfig.md
Last active April 27, 2024 22:02
Yealink Phone OpenVPN configuration

.tar archive structure

phone.tar

| `vpn.cnf` main configuration
| `keys` keys folder
 \
  | `ca.crt` CA certificate
  | `phonecert.crt` Phone certificate
 | `phonekey.key` Phone key
@supermarsx
supermarsx / Windows11InstallationBypass.txt
Created April 17, 2024 10:36
Windows 11 installation requirements bypass
1. SHIFT + F10
2. regedit
3. HKEY_LOCAL_MACHINE\SYSTEM\Setup
4. LabConfig (KEY)
5. BypassTPMCheck, BypassSecureBootCheck, BypassRAMCheck (DWORD 1)
@supermarsx
supermarsx / setIpsecConfiguration.ps1
Last active April 3, 2024 20:59
Set IPSec configuration
Set-VpnConnectionIPsecConfiguration -ConnectionName "Your VPN Name" -AuthenticationTransformConstants SHA256128 -CipherTransformConstants AES128 -DHGroup Group14 -EncryptionMethod AES128 -IntegrityCheckMethod SHA256 -PFSgroup PFS2048 -Force
@supermarsx
supermarsx / addCustomFontsToLoginAndAdmin.php
Last active April 3, 2024 20:59
Add fonts and styles to login and admin pages Wordpress
(...)
add_action( 'wp_enqueue_scripts', array( $this, 'preload_styles' ), 1 );
add_action( 'admin_enqueue_scripts', array( $this, 'preload_styles' ), 1 );
add_action( 'login_enqueue_scripts', array( $this, 'preload_styles' ), 1 );
(...)
@supermarsx
supermarsx / getDistributionGroupCsvNameAndAddresses.ps
Created March 5, 2024 15:22
Get Exchange Distribution group name, primary address and aliases to csv
Get-DistributionGroup -ResultSize Unlimited |Select-Object DisplayName,PrimarySmtpAddress, @{Name="EmailAddresses";Expression={$_.EmailAddresses |Where-Object {$_.PrefixString -ceq "smtp"} | ForEach-Object {$_.SmtpAddress}}} | Export-Csv group-addresses.csv