Skip to content

Instantly share code, notes, and snippets.

View wouterj's full-sized avatar

Wouter de Jong wouterj

View GitHub Profile
<?php
namespace App\Security;
use App\Security\User;
use Lcobucci\JWT\Encoding\CannotDecodeContent;
use Lcobucci\JWT\Token\InvalidTokenStructure;
use Lcobucci\JWT\Token\Parser;
use Lcobucci\JWT\Token\UnsupportedHeaderFound;
use Lcobucci\JWT\Validation\Constraint\RelatedTo;
@wouterj
wouterj / doc.md
Last active June 3, 2022 12:54
A better syntax highlighting for ReStructured Text in Vim.

Installation

To install this highlighter, copy past the vim.rst file into .vim/syntax (or vimfiles\syntax if you're on windows).

Development Phrase

Please note that this highlighter is currently in development phrase, it's not fully tested and can be buggy sometimes.

<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
{
"require": {
"symfony/error-handler": "^5.3"
}
}
<?php
$root
->fixXmlConfig('path')
->children()
->arrayNode('paths')
->beforeNormalization()
->ifString()
->then(function ($v) {
return array($v);
@wouterj
wouterj / post.md
Last active July 13, 2021 02:00
How to use Jekyll, Plugins and Sass on GitHub Pages

How to use Jekyll, Plugins and Sass on GitHub Pages

Jekyll is a great CMS for developers and GitHub Pages is a great host to store your Jekyll sites. There is just one problem, GitHub runs Jekyll in safe mode, which means you can't use plugins. One thing you can do is building the Jekyll website locally and then push to GitHub.

Alexandre Rademaker found a solution to do this easially, which is quite usefull: "GitHub Pages and Jekyll plugins" After reading this I thought, that can be done easier!

Aliases to rescue

Git provides a way to have aliases of bash commands. You can do this by adding items to the alias key of your configuration. For this, you can add this locally by adding this lines to your %PROJECT_ROOT%/.git/config file:

@wouterj
wouterj / 1-tokenize output
Last active July 5, 2020 12:50
DOCtor tokenizer
TYPE_TITLE Bootstrap 4 Form Theme
======================
TYPE_TEXT Symfony provides several ways of integrating Bootstrap into your application. The
most straightforward way is to add the required
TYPE_LITERAL ``<link>``
TYPE_TEXT and
TYPE_LITERAL ``<script>``
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$ composer require --no-update symfony/framework-bundle "~2.3.3|~2.6.6"
$ composer require --no-update symfony/symfony "*"
$ composer update -q
$ composer show -i
...
symfony/framework-bundle v2.6.12
symfony/symfony          v2.8.1