Skip to content

Instantly share code, notes, and snippets.

View alnutile's full-sized avatar

Alfred Nutile alnutile

View GitHub Profile
<?php
namespace Alnutile\Example;
class SkeletonClassTest extends TestCase
{
/**
* Test that true does in fact equal true
*/
public function testTrueIsTrue()
<?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();
<?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 June 17, 2017 00:33
Code for Medium post on CLI Skel
#!/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';
---
- 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
<style scoped>
.action-link {
cursor: pointer;
}
.m-b-none {
margin-bottom: 0;
}
</style>

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.

@alnutile
alnutile / RunReportSlackTest.php
Created March 22, 2017 16:04
Slack In and Out
<?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
{

Keybase proof

I hereby claim:

  • I am alnutile on github.
  • I am alfrednutile (https://keybase.io/alfrednutile) on keybase.
  • I have a public key whose fingerprint is 9E37 A135 9B41 67A8 8252 819A 75F3 3A19 75EB 9121

To claim this, I am signing this object:

[program:queue-listener-default]
process_name=%(program_name)s_%(process_num)02d
command=php {{ path }}/artisan queue:work default --tries=3 --sleep=3 --daemon
autostart=true
autorestart=true
user={{ user }}
numprocs=5
redirect_stderr=true