Skip to content

Instantly share code, notes, and snippets.

Abed Halawi Mulkave

Block or report user

Report or block Mulkave

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Mulkave
Mulkave / gcrgc.sh
Created Oct 28, 2017 — forked from ahmetb/gcrgc.sh
Script to clean up Google Container Registry images pushed before a particular date
View gcrgc.sh
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
View CreateArticleFeature-with-operation.php
<?php
class CreateArticleFeature extends Feature
{
public function handle(Request $request)
{
$this->run(new ValidateArticleInputForCreationJob($request->input()));
// process cover photo
$cover = $this->run(ProcessArticleCoverOperation::class);
View ProcessArticleCoverOperation.php
<?php
class ProcessArticleCoverOperation extends Operation
{
public function handle(Request $request)
{
$photo = $this->run(MakePhotoFromDataJob::class, ['data' => $request->input('photo')]);
$this->run(new ValidateCoverPhotoDimensionsJob($photo));
$variations = $this->run(new GeneratePhotoVariationsJob($photo));
$uploads = $this->run(new UploadFilesToCdnJob($variations));
View UpdateArticleFeature-no-operation.php
<?php
class UpdateArticleFeature extends Feature
{
public function handle(Request $request)
{
$this->run(new ValidateArticleInputForUpdateJob($request->input()));
// process cover photo
$photo = $this->run(MakePhotoFromDataJob::class, ['data' => $request->input('photo')]);
View CreateArticleFeature-no-operation.php
<?php
class CreateArticleFeature extends Feature
{
public function handle(Request $request)
{
$this->run(new ValidateArticleInputForCreationJob($request->input()));
// process cover photo
$photo = $this->run(MakePhotoFromDataJob::class, ['data' => $request->input('photo')]);
View sample-readme.md

Trellis • My Service

This service fetches ghosts and throws them at every client requesting it, in the hope of being haunted.

Namespace: Trellis\MyService

Requirements

  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
View lucid-RespondWithJsonJob.php
<?php
namespace Directory\Domains\Http\Jobs;
use Directory\Foundation\AbstractJob;
use Illuminate\Routing\ResponseFactory;
class RespondWithJsonJob extends AbstractJob
{
private $content;
View lucid-RegisterCitizenFeatureTest.php
<?php
namespace Directory\Services\Site\Tests\Features;
use Faker\Factory as Faker;
use Directory\Foundation\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
class RegisterCitizenFeatureTest extends TestCase
{
View lucid-TestCase.php
<?php
namespace Directory\Foundation;
use TestCase as BaseTestCase;
class TestCase extends BaseTestCase
{
}
View lucid-phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
You can’t perform that action at this time.