Skip to content

Instantly share code, notes, and snippets.

Daniel Opitz odan

Block or report user

Report or block odan

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
View User Authentication System.md

User authentication system

Your task is now to create a user authentication system.

This document will guide you through all the features and implication of such system, so that you don't have to search them yourself.

We will focus on web/browser-technologies, however similar concept can be widely applied. This guide, is a work in progress, feel free to comment and provide feedbacks.

Expected Workflows

View slim4-oauth2-jwt.md
View TypeInspector.php
<?php
namespace App\Utility;
use DomainException;
use ReflectionClass;
/**
* Type inspector.
*/
@odan
odan / Slim 4 Tutorial.md
Last active Feb 21, 2020
Slim 4 Tutorial
View Slim 4 Tutorial.md
@odan
odan / twitter-images.md
Last active Oct 9, 2019
Twitter images
View twitter-images.md

Twitter Images (2019)

  • Header photo: 1500 x 500 px

  • Profile photo: 400 x 400 px

  • Tweet image: Minimum 440 x 220 px, Desktop: 506 x 253 px, Maximum: 1024 x 512 px

  • Image types include: JPG, GIF or PNG.

Source

@odan
odan / mock-flysystem-with-vfsStream.md
Last active Nov 24, 2019
Creating a mocked local filesystem adapter with vfsStream
View mock-flysystem-with-vfsStream.md

Creating a mocked local Flysystem adapter with vfsStream

Note: In this example I don't use the flysystem Memory or Null adpater, because these adapters don't implement the getPathPrefix method, like the AbstractAdapter does. For this reason I use the Local adapter in LOCK_NB mode in combination with vfsStream to simulate the filesystem in-memory.

Setup

composer require mikey179/vfsstream --dev
@odan
odan / mock-ramsey-uuid.md
Last active Oct 3, 2019
Mock Ramsey\Uuid
View mock-ramsey-uuid.md

Mock Ramsey\Uuid

The mock method

use Ramsey\Uuid\Generator\RandomGeneratorInterface;
use Ramsey\Uuid\Uuid;
use RuntimeException;
// ...
@odan
odan / slim4-cors-with-preflight-request.md
Last active Nov 24, 2019
Slim 4 - CORS with preflight request
View slim4-cors-with-preflight-request.md
You can’t perform that action at this time.