Skip to content

Instantly share code, notes, and snippets.

View sveneisenschmidt's full-sized avatar
🚀

Sven Eisenschmidt sveneisenschmidt

🚀
View GitHub Profile
info: {version: '1.0', title: Personnel Data, description: API for reading and writing
personnel data including data about attendances and absences}
paths:
/auth:
post:
tags: [Auth]
description: Request Authentication Token
parameters:
- {name: client_id, in: query, required: true, description: Client id of the
downloaded credentials file, type: string}
const glob = require('glob');
const path = require('path');
const fs = require('fs');
const splitFiles = (list, size) => {
let sets = [];
let chunks = list.length / size;
let i = 0;
while (i < chunks) {
function runSuite(suite, suiteConf, browser) {
// Start: New Code
// check chunks, if chunks are set, expand suite
if(suiteConf.chunks && Number.isFinite(suiteConf.chunks)) {
let pattern = config.tests || null;
if (pattern) {
let forks = [];
let files = findFiles(pattern);
let chunkSize = Math.ceil(files.length/suiteConf.chunks);
@sveneisenschmidt
sveneisenschmidt / codecept.conf.js
Last active March 5, 2018 12:18
Grab tracking id cookie
{
'helpers': {
'Tracking': {
'require': './support/tracking_helper.js'
}
}
}
@sveneisenschmidt
sveneisenschmidt / idea-1.md
Last active October 11, 2018 10:45
[Draft] Parallel execution of CodeceptJS tasks

Idea 1

Introduce chunking to run-multiple

A first step is to introduce file base chunking to run-multiple. Technically we will do
a dynamic expansion of configuration to generate (n) run groups base one the chunks configured.

Context Files:

  • codecept.json
  • features/example1_test.js
<?php
namespace Component\Engine\Storage;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Component\Engine\Storage\StorageTrait;
use Component\Engine\Events;
use Component\Engine\Event\ObjectEvent;
use Component\Entity\PlayerInterface;
<?php
namespace Bundle\FrontendBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
class EventsController extends Controller
FROM ubuntu:16.04
RUN PACKAGES="\
php-cli \
php-mysql \
php-intl \
php-xml \
php-curl \
php-dom \
" && \
@sveneisenschmidt
sveneisenschmidt / vagrant-up.sh
Created February 10, 2016 10:01
Fixes the NFS problem with Alpine Linux Box "maier/alpine-3.1.3-x86_64"
#!/bin/sh
echo "Removing old VM"
vagrant destroy
echo "Initilaizing VM"
vagrant up --no-provision
echo "Updating dependencies"
echo "* Fixes NFS error"
<?php
namespace Nelmio\Alice\Util;
use \Nelmio\Alice\Instances\Processor\Processable;
use \Nelmio\Alice\Instances\Processor\Methods\Faker;
class FakerFacade
{
/**