This file contains 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 | |
/* | |
* License: MIT | |
* Author: Michele Locati <[email protected]> | |
*/ | |
declare(strict_types=1); | |
set_error_handler( |
This file contains 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
name: Attach release asset | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
attach_release_asset: | |
name: Attach release asset |
This file contains 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 | |
set -o errexit | |
set -o nounset | |
printf -- '- cleanup... ' | |
rm -rf ./tmp | |
mkdir ./tmp | |
echo 'done.' |
This file contains 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 | |
set_error_handler( | |
static function ($errno, $errstr, $errfile, $errline) | |
{ | |
$message = trim((string) $errstr); | |
if ($message === '') { | |
$message = "Unknown error (code: {$errno})"; | |
} | |
if ($errfile) { |
This file contains 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 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 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 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 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 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"> |
NewerOlder