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 sh | |
if [[ -z "$1" ]]; then | |
echo "Usage: $0 <test> [<expected>]" | |
exit 1 | |
fi | |
test=$1; | |
expected=$2; |
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 sh | |
gh run list -c `git rev-parse HEAD` --status=failure --json 'databaseId' | jq -r '.[] | .databaseId' | xargs -n1 gh run rerun --failed |
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 sh | |
gh run list --workflow 'auto-merge' --status=failure --json 'databaseId' | jq -r '.[] | .databaseId' | xargs -n1 gh run rerun --failed |
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
import { writeFileSync } from "node:fs"; | |
import { octokit } from "./lib.js"; | |
async function pullRequests(login, repo, limit, { columns }) { | |
const items = []; | |
let after = null; | |
let hasNextPage = false; | |
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
function recordVariableTypes(name: string, variables: Record<string, any>) { | |
const types = Object.entries(variables).reduce( | |
(obj, [key, value]) => ({ ...obj, [key]: typeOf(value) }), | |
{} | |
); | |
recordTypes(name, types); | |
} | |
function recordTypes(name: string, types: Record<string, string>) { | |
const path = `types_${name}.json`; |
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 | |
// Usage: | |
// 1. Clone: https://github.com/vimeo/psalm.git | |
// 2. Run this script inside the repository. | |
$dir = __DIR__ . '/docs/running_psalm/'; | |
$issues = glob($dir . 'issues/*.md'); | |
$docs = file_get_contents($dir . 'error_levels.md'); | |
foreach ($issues as $issue) { |
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 | |
use GuzzleHttp\Client as HttpClient; | |
use GuzzleHttp\Exception\GuzzleException; | |
require_once 'vendor/autoload.php'; | |
$input = ["Hallo", "Welt"]; |
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 ($argc !== 2) { | |
echo "USAGE: $argv[0] PATH"; | |
exit(1); | |
} | |
$root = $argv[1]; | |
if (!is_dir($root)) { |
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 | |
for ($i = 0; $i <= 255; $i++) { | |
printf("%d:%s\n", $i, mb_detect_encoding(chr($i))); | |
} | |
/** | |
Output: | |
0:'ASCII' | |
1:'UTF-8' |
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 sh | |
docker pull phpmyadmin/phpmyadmin | |
docker stop myadmin || true | |
docker rm myadmin || true | |
docker run --name myadmin -d --network="host" -e PMA_HOST=127.0.0.1 phpmyadmin/phpmyadmin |
NewerOlder