Skip to content

Instantly share code, notes, and snippets.

View rieschl's full-sized avatar

Thomas Rieschl rieschl

View GitHub Profile
@internalsystemerror
internalsystemerror / git-checkout-default
Last active September 19, 2022 13:57
Switch to the default branch of a specified remote git repository
#!/usr/bin/env bash
set -e
USAGE="Usage:
git-checkout-default <remote>"
# show help if requested
if [ "x$1" == "x-h" ] || [ "x$1" == "x-?" ] || [ "x$1" == "x--help" ]; then
echo "Switch to the default branch of a specified remote git repository."
@internalsystemerror
internalsystemerror / fesd
Last active September 19, 2022 16:52 — forked from legeyda/foreach
Bash script to execute a given command in all subdirectories of the current directory
#!/usr/bin/env bash
set -e
trap "exit" INT
USAGE="Usage:
fesd <command>"
# show help if requested
if [ "x$1" == "x-h" ] || [ "x$1" == "x-?" ] || [ "x$1" == "x--help" ]; then
@weierophinney
weierophinney / laminas-gha.md
Last active April 24, 2021 15:14
How to prepare a PR to add the GHA CI workflow to Laminas/Mezzio/Laminas API Tools repos

PRs should do the following:

  • Remove the CHANGELOG.md file (we will be doing changelogs in the milestone descriptions, and those get propagated to tags and release notes)

  • Add the workflow file:

    mkdir -p .github/workflows ; cd  .github/workflows ; wget https://gist.githubusercontent.com/weierophinney/9decd19f76b7d9745c6559074053fa65/raw/6ffb33e59796cfec569405139aa65da9396ea5cd/continuous-integration.yml
@marcguyer
marcguyer / AbstractFunctionalTest.php
Last active February 9, 2020 10:56
Functional test abstract using phpunit, Expressive, Doctrine ORM, OAuth2, PSR7, PSR15
<?php
declare(strict_types=1);
namespace FunctionalTest;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Tools\SchemaTool;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerInterface;