Skip to content

Instantly share code, notes, and snippets.

Avatar
🐘
Developing some stuff in PHP

cierzniak

🐘
Developing some stuff in PHP
View GitHub Profile
@cierzniak
cierzniak / Makefile
Last active Nov 24, 2019
Monorepo with separate testing suites on pre-commit hook
View Makefile
.PHONY: add-git-hooks test-backend test-frontend
add-git-hooks:
rm -rf .git/hooks
ln -sf ../_misc/hooks .git/hooks
test-backend:
docker rm back_test || true
docker build --file _misc/docker-test/backend/Dockerfile --tag back_test .
docker run --name=back_test back_test
@cierzniak
cierzniak / install-tibia.sh
Last active Aug 1, 2019
Tibia Linux Client installer
View install-tibia.sh
#!/usr/bin/env bash
GAME_DOWNLOAD_URL=https://static.tibia.com/download/tibia.x64.tar.gz
MAPS_DOWNLOAD_URL=https://tibiamaps.io/downloads/minimap-with-markers
TEMP_DIR=$(mktemp -d)
APP_DIR=/opt/Tibia
USER_DIR=${HOME}/.local/share/CipSoft\ GmbH/Tibia/packages/Tibia
echo "Install Tibia Linux Client with maps"
@cierzniak
cierzniak / src_Controller_SampleController.php
Created Dec 5, 2018
Request Handler with Validation for PHP projects
View src_Controller_SampleController.php
<?php declare(strict_types=1);
namespace Api\Controller;
use Api\Model\User\TokenDTO;
use Api\RequestValidator\RequestHandler;
use Api\RequestValidator\Security\RefreshTokenRequestValidator;
use Api\RequestValidator\ValidationFailed;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;