Skip to content

Instantly share code, notes, and snippets.

View marcmascort's full-sized avatar
☠️
Searching the One Piece

Marc Mascort Bou marcmascort

☠️
Searching the One Piece
View GitHub Profile
@stefanzweifel
stefanzweifel / push.yml
Last active August 27, 2019 19:57
Example Configuration to run phpunit for a Laravel App on GitHub Actions
on: push
name: Run phpunit testsuite
jobs:
phpunit:
runs-on: ubuntu-latest
# container:
# image: lorisleiva/laravel-docker:7.3
steps:
- uses: actions/checkout@v1
@calebporzio
calebporzio / chain_helper.php
Last active July 23, 2023 04:27
Handy "chain()" helper method for making non-fluent classes/objects fluent.
<?php
function chain($object)
{
return new class ($object) {
protected $lastReturn = null;
public function __construct($object)
{
$this->wrapped = $object;
@servers(['web' => $user.'@'.$host,'localhost' => '127.0.0.1'])
@setup
// Sanity checks
if (empty($host)) {
exit('ERROR: $host var empty or not defined');
}
if (empty($user)) {
exit('ERROR: $user var empty or not defined');
}