Skip to content

Instantly share code, notes, and snippets.

View MircoBabin's full-sized avatar

Mirco Babin MircoBabin

  • The Netherlands
View GitHub Profile
@MircoBabin
MircoBabin / transcludeTid.js
Created June 10, 2026 19:14
transcludeTid.js
/*
This is a Tiddly Wiki https://tiddlywiki.com/ widget.
Tested with v5.4.0 and TiddlyWikiWatcher https://github.com/MircoBabin/TiddlyWikiWatcher v2.5.
transcludeTid version: 1.0
Usage:
<$transcludeTid $url="./my-tids/saved.tid" />
This widget transcludes (embeds) the relative TID url/file "./my-tids/saved.tid".
@MircoBabin
MircoBabin / PHP RFC - The constructor must not return a value.txt
Last active June 30, 2026 05:49
PHP RFC - The constructor must not return a value
^ This RFC is rendered obsolete by the accepted [[https://wiki.php.net/rfc/deprecate-return-value-from-construct|PHP RFC: Deprecate returning values from __construct() and __destruct()]]. ^
====== PHP RFC: The constructor must not return a value ======
* Version: 1.4
* Date: 2026-03-06
* Author: Mirco Babin, <mirco.babin@gmail.com>
* Status: Rejected by the author
* Implementation: None
===== RFC is rejected by the author =====
@MircoBabin
MircoBabin / PhpWinKeyboard.php
Created December 31, 2025 15:24
PHP on Windows - read a key from the keyboard in the CLI.
<?php
/*
PhpWinKeyboard - MIT license - v1.0 - 2025-12-31
------------------------------------------------
Copyright (c) 2025 Mirco Babin
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@MircoBabin
MircoBabin / SvgToWindowsExecutableIcon.bat
Last active March 21, 2025 08:28
Convert SVG to Windows executable icon using ImageMagick
@echo off
setlocal
rem SvgToWindowsExecutableIcon.bat
rem Windows/OS used: Windows/11
rem ----------------------------------------------------
rem
rem Version 1.1 - released on friday 21 march 2025
rem
rem ----------------------------------------------------
@MircoBabin
MircoBabin / httpsCertificateLookup.php
Last active September 15, 2023 06:02
Check https certificate
<?php
/*
MIT license
Copyright (c) 2022 Mirco Babin
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
@MircoBabin
MircoBabin / NetworkTimeProtocolClient.php
Created October 16, 2022 18:04
PHP ntp client for retrieving time via Network Time Protocol (ntp, sntp, RFC 1769, RFC 4330) - Php 5.4.44 and later - sunday 16 october 2022
<?php
/*
MIT license
Copyright (c) 2022 Mirco Babin
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
@MircoBabin
MircoBabin / index.html
Created October 21, 2020 08:16
Convert IIS web.config to Apache .htaccess
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>IIS web.config to Apache .htaccess rule translator</title>
<style>
#xmldoc {
width: 100%;
height: 200px;
@MircoBabin
MircoBabin / ReadingPortableExecutable_PE_header.cs
Last active June 3, 2021 13:02 — forked from augustoproiete/ReadingPortableExecutable_PE_header.cs
Reading the Portable Executable (PE) header in C# - reading Import Directory Table to e.g. determine Microsoft VC Runtime version
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
namespace peheader
{
//https://gist.github.com/caioproiete/b51f29f74f5f5b2c59c39e47a8afc3a3