Skip to content

Instantly share code, notes, and snippets.

odan /
Last active September 22, 2023 08:29
Nginx and PHP Setup on Windows
odan / unbloat.bat
Last active July 31, 2023 15:22
Remove Windows Bloatware
View unbloat.bat
@echo off
winget list
winget uninstall "Solitaire & Casual Games"
winget uninstall "Microsoft Kontakte"
winget uninstall "Movies & TV"
winget uninstall "News"
winget uninstall "Get Help"
winget uninstall "Microsoft People"
odan /
Last active March 29, 2023 12:32
Mocking Interfaces with PHPUnit
View ExcelFileReader.php
use PhpOffice\PhpSpreadsheet\Cell\Coordinate;
use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
* ExcelFileReader.
class ExcelFileReader

Remove HTML tags


$html = '<div class="cc">
    Explore the use of simple 
    <a class="keyword_w_elaboration">technologies</a>
    <div class="elaboration" style="text-decoration:none">
odan / remove-namespaces-xml.php
Last active March 25, 2023 11:26
Remove all namespaces from XML in PHP (dirty hack)
View remove-namespaces-xml.php
$dom = new DOMDocument();
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
$dom->loadXML(file_get_contents(__DIR__ . '/demo.xml'));
$dom = removeAllNamespaces($dom);
odan /
Last active March 25, 2023 11:26
Spliting a PDF file into multiple PDF files