Skip to content

Instantly share code, notes, and snippets.

View Axlfc's full-sized avatar
🛸
Working from outer space

Axel Axlfc

🛸
Working from outer space
View GitHub Profile
@Axlfc
Axlfc / extend-trial-jetbrains-windows.bat
Created July 17, 2025 10:02 — forked from rjescobar/extend-trial-jetbrains-windows.bat
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
@Axlfc
Axlfc / convert_aac_to_wav.bat
Created December 18, 2024 14:57
Use ffmpeg to convert .aac to .wav from a folder
@echo off
setlocal enabledelayedexpansion
set "source_folder=C:\Users\AxelFC\Music\Recordings"
set "ffmpeg_path=C:\ffmpeg\bin\ffmpeg.exe"
for /R "%source_folder%" %%A in (*.aac) do (
set "filename=%%~nA"
set "file_without_extension=!filename:.aac=!"
"%ffmpeg_path%" -i "%%A" "%source_folder%\!file_without_extension!.wav"
param (
# Define a parameter for the folder path
[Parameter(Mandatory=$true)]
[string]$folderPath
)
try {
# Verify the path exists
if (-Not (Test-Path $folderPath)) {
Write-Error "The provided path does not exist or is not accessible. Please provide a valid path."
function Get-WifiMacAddress {
try {
# Get network adapters
$adapters = Get-NetAdapter | Where-Object { $_.InterfaceDescription -like '*Wi-Fi*' }
if ($adapters.Count -eq 0) {
Write-Error "No Wi-Fi adapter found."
return $null
}
function Get-WifiIPAddress {
try {
# Get network adapters with Wi-Fi in their description
$adapters = Get-NetAdapter | Where-Object { $_.InterfaceDescription -like '*Wi-Fi*' }
if ($adapters.Count -eq 0) {
Write-Error "No Wi-Fi adapter found."
return $null
}
function Get-ComputerModelAndManufacturerFolderName {
try {
$csModel = (Get-ComputerInfo).CsModel
$csManufacturer = (Get-ComputerInfo).CsManufacturer
$folderName = $csManufacturer + " " + $csModel
return $folderName
} catch {
Write-Error "Failed to retrieve computer model and manufacturer information."
}
}
function Get-EthernetMacAddress {
try {
# Get network adapters
$adapters = Get-NetAdapter | Where-Object { $_.InterfaceDescription -like '*Ethernet*' }
if ($adapters.Count -eq 0) {
Write-Error "No Ethernet adapter found."
return $null
}
function Get-EthernetIPAddress {
try {
# Get network adapters with Ethernet in their description
$adapters = Get-NetAdapter | Where-Object { $_.InterfaceDescription -like '*Ethernet*' }
if ($adapters.Count -eq 0) {
Write-Error "No Ethernet adapter found."
return $null
}
function Get-ComputerSerialNumber {
try {
$SerialNumber = (Get-WmiObject -class win32_bios).SerialNumber
return $SerialNumber
} catch {
Write-Error "Failed to retrieve computer model and manufacturer information."
}
}
Get-ComputerSerialNumber
function Check-DefaultBrowser {
$currentBrowserProgId = (Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice').ProgId
return -not ($currentBrowserProgId -like "FirefoxURL-*")
}
function Check-DefaultPDFApplication {
$User = New-Object System.Security.Principal.NTAccount($env:UserName)
$sid = $User.Translate([System.Security.Principal.SecurityIdentifier]).value
$key = "HKU:\${sid}\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice"