Skip to content

Instantly share code, notes, and snippets.

Avatar

Alfred Nutile alnutile

View GitHub Profile
View coverage-checker.php
<?php
// coverage-checker.php
//https://ocramius.github.io/blog/automated-code-coverage-check-for-github-pull-requests-with-travis/
$inputFile = $argv[1];
$percentage = min(100, max(0, (int) $argv[2]));
if (!file_exists($inputFile)) {
throw new InvalidArgumentException('Invalid input file provided');
}
View phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
View SkeletonClassTest.php
<?php
namespace Alnutile\Example;
class SkeletonClassTest extends TestCase
{
/**
* Test that true does in fact equal true
*/
public function testTrueIsTrue()
View app.php
<?php
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;
load_dotenv();
View autoload.php
<?php
define('COMMAND_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
@alnutile
alnutile / command.php
Last active Jun 17, 2017
Code for Medium post on CLI Skel
View command.php
#!/usr/bin/env php
<?php
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;
require __DIR__.'/bootstrap/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
View after_install.yml
---
- name: Create Oauth Keys
become: yes
become_user: catuser
command: php /home/{{ user }}/app/artisan passport:keys --quiet
ignore_errors: true
- name: Install for s3 module
pip:
name: boto
View Clients.vue
<style scoped>
.action-link {
cursor: pointer;
}
.m-b-none {
margin-bottom: 0;
}
</style>
View ard.md

ADR 001: Cloning Segments Skateboard Level (Proposed)

Status

Context

Given the complexity of segmenting data sets, users may wish to clone existing segments in order to speed up the reporting process.

And we have a short time line / budget.

View RunReportSlackTest.php
<?php
use App\Exceptions\NotSlackUrlException;
use App\Jobs\RunHubplannerReportJob;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Queue;
class RunReportSlackTest extends TestCase
{
You can’t perform that action at this time.