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
| # BlackLivesMatter | |
| name: Build & Test Extension | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| qa: | |
| runs-on: ubuntu-latest |
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) | |
| # Basic components | |
| (?<ALPHA>[A-Za-z]) | |
| (?<BIT>[01]) | |
| (?<DIGIT>[0-9]) | |
| (?<HEXDIG>[0-9A-Fa-f]) | |
| (?<CHAR>[\x01-\x7F]) | |
| (?<VCHAR>[\x21-\x7E]) | |
| (?<SP>[\x20]) | |
| (?<WSP>[\x20\x09]) |
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 | |
| /* | |
| Conflicts with file systems: :, *, ", <, >, | | |
| Conflicts with shell variables: $ | |
| Conflicts with bash brace expansion {, } | |
| */ |
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/bash | |
| # GitHub username/organization | |
| USERNAME="ghostwriter" | |
| # Secret name and value | |
| SECRET_KEY="CODECOV_TOKEN" | |
| SECRET_VALUE="global-upload-token" | |
| # Get the list of repositories for the user |
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 | |
| #BlackLivesMatter | |
| /** | |
| * Obfuscate a string to prevent spam-bots from sniffing it. | |
| */ | |
| function obfuscate(string $value): string | |
| { | |
| $safe = ''; |
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: 🍃 Install mongosh | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y wget gnupg | |
| wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - | |
| echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list | |
| sudo apt-get update | |
| sudo apt-get install -y mongodb-mongosh |
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 | |
| function getOpenBinary(): string | |
| { | |
| return match (PHP_OS_FAMILY) { | |
| // Using PowerShell allows us to open the file in the background | |
| 'Windows' => 'powershell Start-Process', | |
| 'Darwin' => 'open', | |
| 'Linux' => 'xdg-open', |
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/bash | |
| # for use with cron, eg: | |
| # 0 3 * * * postgres /var/db/pg-backup.sh foo_db | |
| if [[ -z "$1" ]]; then | |
| echo "Usage: $0 <db_name> [pg_dump args]" | |
| exit 1 | |
| fi |
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
| num_args=$# | |
| max_runs=$1 | |
| sleep=$2 | |
| cmd=$3 | |
| shift 3 | |
| args=("$@") | |
| runs=0 | |
| [[ $num_args -le 2 ]] && echo "Usage retry.sh <sleep> <retry_times> <command>" && exit 0; | |
| until [[ $runs -ge $max_runs ]] | |
| do |
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
| class Errors { | |
| /** | |
| * Create a new Errors instance. | |
| */ | |
| constructor() { | |
| this.errors = {}; | |
| } | |
| /** |