Skip to content

Instantly share code, notes, and snippets.

View PakL's full-sized avatar

Pascal Pohl PakL

View GitHub Profile
@PakL
PakL / btm.md
Last active June 3, 2025 13:58
Installer batch for Star Wars: Behind The Magic

Star Wars: Behind The Magic - Installer Batch

Star Wars: Behind The Magic is a multimedia CD-ROM released in 1998 for Windows 95/98. Due to the nature of the installer, the software cannot be installed on a modern Windows even though the rest of the software itself runs fine.

The batch below will copy all necessary files and create all necessary registry entries for the software to function. It will also create two DXWnd profiles you can import to run it in a borderless window.

You will need to run it as administrator in the location you want to install to.

Once installed you can either run the behind.exe on the CD or in the install folder. If you'd like shortcuts you'll need to create those yourself, the installer will not create any.

@PakL
PakL / ddg_speed_up_filter.txt
Created May 17, 2025 10:51
Speed up DuckDuckGo (omg why does it take so long this can't be real)
! Title: Speed up DuckDuckGo
! Description: Disables a slow loading script that I believe is used for the AI functionality. So you'll loose that.
! Version: 0.1.0
! Last modified: 2025-05-17 10:50
! Expires: 2 weeks (update frequency)
! Homepage: https://gist.github.com/PakL/c522358f3008b8403ceb8de4a67fba68
https://links.duckduckgo.com/d.js
@PakL
PakL / downgrade.php
Created October 11, 2022 08:50
Stream Deck OBS Button downgrade from 5.3 to 5.2
<?php
$mainProfileFolder = getenv('APPDATA') . DIRECTORY_SEPARATOR . 'Elgato' . DIRECTORY_SEPARATOR . 'StreamDeck' . DIRECTORY_SEPARATOR . 'ProfilesV2';
//$mainProfileFolder = __DIR__;
function downgradeOBS($action) {
if($action['UUID'] === 'com.elgato.obsstudio.scene') {
$action['UUID'] = 'com.elgato.streamdeck.obs.scene';
if(!isset($action['Settings']['sceneId']) && isset($action['Settings']['scene'])) {
$action['Settings']['sceneId'] = $action['Settings']['scene'];
@PakL
PakL / Hendraheim.md
Created April 2, 2022 16:26
Hendraheim Items

Hendraheim Items

Swords

  • Dragonbane
  • Dawnbreaker
  • Ebony Blade
  • Harkon's Sword
  • Bloodskal Blade
  • Bloodscythe
  • Soulrender
@PakL
PakL / Nightbot dice roll.md
Last active February 16, 2025 06:45
Nightbot command to roll dice

Simple Nightbot command to roll any number of any kind of dice

$(eval var i=parseInt,d=[],e='$(provider)'=='twitch'?'melziiD20':'🎲20',j=0,l,m='$(query)'.match(/^(([0-9]+)\s+)?(([0-9]+)?d([0-9]+)|([0-9]+))$/)??{},c=i(m[2]??1),n=i(m[4]??1),s=i(m[5]??m[6]??20);c=c>20?20:(c<1||!c?1:c);n=(n<1?1:n);s=(s<1?1:s);for(;j<c;j+=1){d.push(Math.round(n*(s-1)*Math.random())+n)}r=`$(user) rolled ${d.join(', ')} with ${n<2?'a ':n+'×'}🎲`+s;l=r.lastIndexOf(',');(l<0?r:r.substr(0,l)+' and'+r.substr(l+1)).replace(/( |🎲)20(,| |$)/g,` ${ e } $2`))

Examples:
!roll - PakL rolled a 2 with a 🎲6
!roll 20 - PakL rolled a 14 with a 🎲20
!roll 2d6 - PakL rolled a 11 with 2×:game_die:6

param (
[Parameter(Mandatory=$true)][string]$ComputerName,
[int]$Port = 443
)
Write-Host "Checking certificate for: " -Foreground DarkYellow -NoNewline
Write-Host "$($ComputerName):$($Port)" -Foreground Yellow
$Certificate = $null
$TcpClient = New-Object -TypeName System.Net.Sockets.TcpClient
@PakL
PakL / test.php
Last active March 17, 2016 07:04
msphpsql crash on fetching
<?php
$mssql_resource = sqlsrv_connect(MSSQL_HOST, array("Database" => MSSQL_DATABASE, "UID" => MSSQL_USER, "PWD" => MSSQL_PASSWORD, "CharacterSet" => "UTF-8"));
if(is_resource($mssql_resource)) {
// Query WITHOUT parameters and DEFINED fetchType: Works fine
$stmt = sqlsrv_prepare($mssql_resource, "SELECT TOP 5 * FROM [table]");
if($stmt !== false) {
if(sqlsrv_execute($stmt)) {