Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefano Kowalke Konafets

View GitHub Profile
@Konafets
Konafets / mo-connect-php-middleware.php
Created Jun 20, 2021
Überarbeitete Monkey Office Connect PHP Middleware
View mo-connect-php-middleware.php
<?php
/**
* Basisklasse für alle API-Handler
* Version: 18.1.0
* API-Schema: 91
* erstellt: 28.05.21
*/
/**
@Konafets
Konafets / prepare-commit-msg.sh
Created Aug 21, 2020
This GIT hook populates the commit message with a prefix like [TASK] and suffix which contains the ticket number. It takes this information from the branch name. A branch name task/1234 will create a message: [TASK] (1234))
View prepare-commit-msg.sh
#!/bin/bash
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
# Only do something when we ARE NOT amending a commit!
if [ ! ${SHA1} ]; then
# We are only interesed in feature branches like feature/foo
View README.md

What does it do?

This littel script fetches all packages, listed on packagist with type typo3-cms-extension, and iterates over them and collect download data for every single packages.

It will echo it as csv, so it can easily be parsed into a .csv file for better sorting etc.

How to generate csv file

$ php fetchExtensionDownloadDataFromPackagist.php &gt; downloadData.csv
@Konafets
Konafets / doctrine.yaml
Created Dec 16, 2018
Sylius Doctrine Config Annotation
View doctrine.yaml
parameters:
# Adds a fallback DATABASE_URL if the env var is not set.
# This allows you to run cache:warmup even if your
# environment variables are not available yet.
# You should not need to change this value.
env(DATABASE_URL): ''
doctrine:
dbal:
driver: 'pdo_mysql'
@Konafets
Konafets / doctrine.yml
Created Dec 16, 2018
Sylius Doctrine Configuration
View doctrine.yml
parameters:
# Adds a fallback DATABASE_URL if the env var is not set.
# This allows you to run cache:warmup even if your
# environment variables are not available yet.
# You should not need to change this value.
env(DATABASE_URL): ''
doctrine:
dbal:
driver: 'pdo_mysql'
@Konafets
Konafets / .travis_sylius.yml
Created Nov 23, 2018
Copy the dist test_cache file
View .travis_sylius.yml
- cp .env.test_cached.dist .env.test_cached
- set -a && source .env.test_cached && set +a
@Konafets
Konafets / .gitlab-ci.yml
Last active Oct 5, 2019
Sylius GitLab CI
View .gitlab-ci.yml
stages:
- test
variables:
MYSQL_DATABASE: sylius_test_cached
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: root
# This is normally provided by the .env file. But since we have to use "mysql" as host name, its defined
# here. We not using any .env file!
# The pattern is: mysql://user:password@host/database
@Konafets
Konafets / DataTable.vue
Last active Jul 23, 2019
Watching child component computed properties
View DataTable.vue
<template>
<table-component
:data="[
{ firstName: 'John', birthday: '04/10/1940'},
{ firstName: 'Paul', birthday: '18/06/1942'},
{ firstName: 'George', birthday: '25/02/1943'},
{ firstName: 'Ringo', birthday: '07/07/1940'},
]"
sort-by="firstName"
sort-order="asc"
@Konafets
Konafets / PostStoreRequest.php
Last active Oct 26, 2017
Merge validation rules
View PostStoreRequest.php
<?php namespace App\Http\Requests;
use App\Models\BlogPost;
use Illuminate\Foundation\Http\FormRequest;
class PostStoreRequest extends FormRequest
{
public function rules()
{
return array_merge(BlogPost::$createRules, Author::$createRules);
@Konafets
Konafets / PostStoreRequest.php
Last active Oct 26, 2017
Form Request Validation with rules from Model
View PostStoreRequest.php
<?php namespace App\Http\Requests;
use App\Models\BlogPost;
use Illuminate\Foundation\Http\FormRequest;
class PostStoreRequest extends FormRequest
{
public function rules()
{
return BlogPost::$createRules