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
| /** | |
| * A Map implementation that treats keys as case-insensitive strings. | |
| * This is useful for example for environment variables on Windows, which are case-insensitive. | |
| * Intentionally NOT locale-aware: matches Windows behavior. | |
| * The first inserted key casing is preserved (Windows-like behavior): | |
| * map.set("FOO", 'bar'); | |
| * map.set("Foo", 'bar'); | |
| * map.keys(); // ["FOO"] | |
| * @author Michele Locati <michele@locati.it> | |
| * @license MIT |
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
| <# | |
| .DESCRIPTION | |
| Deletes the specified file or directory (recursively) if it exists. | |
| .PARAMETER Path | |
| The path of the file or directory to delete. | |
| .OUTPUTS | |
| System.Boolean. $false if something existed but could not be removed, $true otherwise. | |
| .NOTES | |
| This is highly inspired by the 'rm -rf' command in Unix-like systems. | |
| #> |
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 | |
| # A post-receive git hook to publish a specific branch to a working tree, | |
| # optionally updating Composer dependencies and/or ConcreteCMS. | |
| # | |
| # Invoke this file from hooks/post-receive. | |
| # For example: | |
| # | |
| # #!/bin/sh | |
| # /path/to/this-file /path/to/repo.git /path/to/worktree --branch main --composer --concrete --concrete-languages 'de_DE fr_FR it_IT' |
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 | |
| # A post-receive git hook to publish a specific branch to a working tree, | |
| # optionally updating Composer dependencies and/or ConcreteCMS. | |
| # | |
| # Invoke this file from hooks/post-receive. | |
| # For example: | |
| # | |
| # #!/bin/sh | |
| # /path/to/this-file /path/to/repo.git /path/to/worktree --branch main --composer --concrete --concrete-languages 'de_DE fr_FR it_IT' |
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 | |
| # First argument (required): path to the directory that contains the ConcreteCMS installation | |
| # Subsequent arguments (optional): language codes to install/update translations for (e.g. 'fr_FR', 'de_DE', etc.) | |
| # | |
| # Copyright Michele Locati <michele@locati.it> - 2026 | |
| # License: MIT - https://opensource.org/license/mit | |
| # Source: https://gist.github.com/mlocati/2195c70caeca3df1240e35d5db871587 | |
| 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
| ip route show | grep ^default | cut -d' ' -f3 |
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 | |
| /* | |
| * License: MIT | |
| * Author: Michele Locati <michele@locati.it> | |
| */ | |
| declare(strict_types=1); | |
| set_error_handler( |
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
| name: Attach release asset | |
| on: | |
| release: | |
| types: | |
| - created | |
| jobs: | |
| attach_release_asset: | |
| name: Attach release asset |
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 | |
| set -o errexit | |
| set -o nounset | |
| printf -- '- cleanup... ' | |
| rm -rf ./tmp | |
| mkdir ./tmp | |
| echo 'done.' |
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 | |
| set_error_handler( | |
| static function ($errno, $errstr, $errfile, $errline) | |
| { | |
| $message = trim((string) $errstr); | |
| if ($message === '') { | |
| $message = "Unknown error (code: {$errno})"; | |
| } | |
| if ($errfile) { |
NewerOlder