This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env php | |
| <?php | |
| const FIX_EOL = true; | |
| const FIX_BOM = true; | |
| set_error_handler( | |
| static function ($errno, $errmsg, $errfile, $errline) | |
| { | |
| throw new RuntimeException("Error {$errno}: {$errmsg}\nFile: {$errfile}\nLine: {$errline}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types=1); | |
| set_error_handler( | |
| static function ($code, $message, $file, $line): void | |
| { | |
| throw new RuntimeException("{$message}\nFile: {$file}\nLine: {$line}"); | |
| }, | |
| -1 | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| To enable Hyper-V: | |
| Enable-HyperV.ps1 $True | |
| To disable Hyper-V: | |
| Enable-HyperV.ps1 $False | |
| Author: Michele Locati <[email protected]> | |
| License: MIT | |
| Source: https://gist.github.com/mlocati/bb146577785511b44412e2fb57f969a6 | |
| #> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Save this file as /application/bootstrap/app.php | |
| if (!function_exists('fnmatch')) { | |
| // Shim for fnmatch | |
| // Code from https://www.php.net/manual/en/function.fnmatch.php#100207 | |
| define('FNM_PATHNAME', 1); | |
| define('FNM_NOESCAPE', 2); | |
| define('FNM_PERIOD', 4); | |
| define('FNM_CASEFOLD', 16); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # This script checks if a go-pear.phar is the same as one of the | |
| # ones released on https://github.com/pear/pearweb_phars | |
| # | |
| # MIT License | |
| # Made by Michele Locati <[email protected]> on 2019-01-23 | |
| set -o errexit | |
| set -o nounset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Punic Units sample</title> | |
| <meta name="charset" value="utf-8" /> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
| </head> | |
| <body> | |
| </body> | |
| <table class="table table-striped table-bordered"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (!function_exists('interface_exists')) { | |
| die('PHP version too old'); | |
| } | |
| $throwables = listThrowableClasses(); | |
| $throwablesPerParent = splitInParents($throwables); | |
| printTree($throwablesPerParent); | |
| if (count($throwablesPerParent) !== 0) { | |
| die('ERROR!!!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal enabledelayedexpansion | |
| if "%~1" equ "" ( | |
| echo Missing file name>&2 | |
| goto :eof | |
| ) | |
| if "%~2" neq "" ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal enabledelayedexpansion | |
| rem Reference: https://wiki.php.net/internals/windows/stepbystepbuild | |
| set MY_VSDIR=C:\Path\To\Microsoft Visual Studio 14.0 | |
| set PATH=%SystemRoot%\System32 | |
| echo # Compiling PHP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _WIN32_WINNT 0x0600 | |
| #include <stdio.h> | |
| #include <windows.h> | |
| #include <fileapi.h> | |
| #ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING | |
| #define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004 | |
| #endif |