View attach-release-asset.yml
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 |
View create-release-asset.sh
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.' |
View list-pecl-versions.php
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) { |
View fix-ckeditor-eol.php
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}"); |
View concrete5-migrations-checker.php
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 | |
); |
View Enable-HyperV.ps1
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 <michele@locati.it> | |
License: MIT | |
Source: https://gist.github.com/mlocati/bb146577785511b44412e2fb57f969a6 | |
#> |
View app.php
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); |
View check-go-pear.phar.sh
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 <michele@locati.it> on 2019-01-23 | |
set -o errexit | |
set -o nounset |
View output.html
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"> |
View exceptions-tree.php
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 | |
if (!function_exists('interface_exists')) { | |
die('PHP version too old'); | |
} | |
$throwables = listThrowableClasses(); | |
$throwablesPerParent = splitInParents($throwables); | |
printTree($throwablesPerParent); | |
if (count($throwablesPerParent) !== 0) { | |
die('ERROR!!!'); |
NewerOlder